mod_rewrite help...

New to mod_rewrite? This is a good place to start.

mod_rewrite help...

Postby sudobash » Wed Nov 02, 2005 10:37 am


I used mod_rewrite to redirect script(s) to go through a wrapper as below:

RewriteRule ^/cgi-bin/1/(.*) /cgi-bin/cgiwrapper/1/$1 [L,P]

However, when a 404 request come in for a non-existent script under /cgi-bin/1, it is being passed onto the wrapper and the wrapper is not able to handle such request. I was trying to block the 404 request going through the wrapper by adding rewrite condition as below:

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^/cgi-bin/1/(.*) /cgi-bin/cgiwrapper/1/$1 [L,P]

This rule is not working.. Any pointers where I am doing wrong?

Posts: 3
Joined: Wed Nov 02, 2005 10:35 am

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 13 guests