Guest_imported
New member
- Jan 1, 1970
- 0
I am having a problem getting mod_rewrite to work.
I have the following:
RewriteEngine on
RewriteRule ^/somepath(.*) $1
For the requested URL
I get the following in the rewrite log:
(2) init rewrite engine with requested uri /somepath/manual/mod/mod_rewrite.html
(3) applying pattern '^/somepath(.*)' to uri '/somepath/manual/mod/mod_rewrite.html'
(2) rewrite /somepath/manual/mod/mod_rewrite.html -> /manual/mod/mod_rewrite.html
(2) local path result: /manual/mod/mod_rewrite.html
(2) init rewrite engine with requested uri /error/HTTP_BAD_REQUEST.html.var {...and the error continues}
It appears to get the correct substitution but it just doesn't work. If I put a [R] at the end of the rule, the redirect does work...
I have spent a long time trying to figure out why, but with no success.
Hopefully someone can help![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Regards
Colin
I have the following:
RewriteEngine on
RewriteRule ^/somepath(.*) $1
For the requested URL
I get the following in the rewrite log:
(2) init rewrite engine with requested uri /somepath/manual/mod/mod_rewrite.html
(3) applying pattern '^/somepath(.*)' to uri '/somepath/manual/mod/mod_rewrite.html'
(2) rewrite /somepath/manual/mod/mod_rewrite.html -> /manual/mod/mod_rewrite.html
(2) local path result: /manual/mod/mod_rewrite.html
(2) init rewrite engine with requested uri /error/HTTP_BAD_REQUEST.html.var {...and the error continues}
It appears to get the correct substitution but it just doesn't work. If I put a [R] at the end of the rule, the redirect does work...
I have spent a long time trying to figure out why, but with no success.
Hopefully someone can help
Regards
Colin