Forum Moderators: phranque
I'm facing an issue with internal (local) rewrites. The very basic rewrite rule I have is:
---------------
RewriteEngine on
RewriteLog "/myfolder/apache2/logs/mod_rewrite.log"
RewriteLogLevel 9
RewriteRule ^/one /two/three.html
---------------
I have the three.html under my apache2/htdocs/two/three.html
The http response my browser gets back is 400: bad request
The rewrite logs are:
::1 - - [15/Dec/2009:15:08:02 +051800] [localhost/sid#80daa0][rid#904650/initial] (2) init rewrite engine with requested uri /one/
::1 - - [15/Dec/2009:15:08:02 +051800] [localhost/sid#80daa0][rid#904650/initial] (3) applying pattern '^/one' to uri '/one/'
::1 - - [15/Dec/2009:15:08:02 +051800] [localhost/sid#80daa0][rid#904650/initial] (2) rewrite '/one/' -> '/two/three.html'
::1 - - [15/Dec/2009:15:08:02 +051800] [localhost/sid#80daa0][rid#904650/initial] (2) local path result: /two/three.html
::1 - - [15/Dec/2009:15:08:02 +051800] [localhost/sid#80daa0][rid#904650/initial] (2) prefixed with document_root to /myfolder/apache2/htdocs/two/three.html
::1 - - [15/Dec/2009:15:08:02 +051800] [localhost/sid#80daa0][rid#904650/initial] (1) go-ahead with /myfolder/apache2/htdocs/two/three.html [OK]
--------------------
The same works with external redirect: say:
RewriteRule ^/one /two/three.html [R]
Really cant figure out whats wrong! any pointers will be of great help!
Thanks,
Shruti