I have a .htaccess problem which is slowly destroying my sanity. In my project, I have a root folder with a 404.php in it, and an explicit subdirectory called signup. The subdirectory contains a file called index.php which performs processing. The project is using XAMPP under Windows 7.
The root .htaccess file contains the following:
Options +FollowSymlinks
RewriteEngine On
ErrorDocument 404 /404.php
The .htaccess in the signup physical subdirectory contains:
RewriteEngine On
RewriteOptions inherit
Options +FollowSymlinks
RewriteCond %{REQUEST_URI} ^/signup/page1$ [NC]
RewriteRule (.*) signup/index.php?page=1 [NC,L]
The rewrite log below seems to be deciding that /signup/page1 does not exist before the rewrite module can even check it. Does anyone have any ideas on what might be causing this issue?
10.1.1.201 - - [03/Dec/2012:15:06:58 +1100] [testsite.com/sid#463bd0][rid#4412b10/initial] (1) [perdir C:/workspace/project/public/signup/] pass through C:/workspace/project/public/signup/page1
10.1.1.201 - - [03/Dec/2012:15:06:58 +1100] [testsite.com/sid#463bd0][rid#4500fc0/initial/redir#1] (3) [perdir C:/workspace/project/public/] strip per-dir prefix: C:/workspace/project/public/404.php -> 404.php
10.1.1.201 - - [03/Dec/2012:15:06:58 +1100] [testsite.com/sid#463bd0][rid#4500fc0/initial/redir#1] (3) [perdir C:/workspace/project/public/] applying pattern '(.*)' to uri '404.php'
You must use
RewriteBaselike this in the.htaccessinside yoursignupdirectory: