httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] mod_rewrite combined with scriptalias
Date Mon, 26 Jun 2006 22:47:42 GMT
On 6/26/06, Brad Bowman <> wrote:
> I seem to be having trouble making url rewrite if it's inside a
> ScriptAlias'd directory.
> I have the following line in my httpd.conf file:
> ScriptAlias  /cgi-bin/ /var/www/vhosts/site/cgi-bin/
> And the following two rules in .htaccess:
> RewriteRule ^random/miva(.*)$ /mm5/merchant.mvc$1 [R=301]
> RewriteRule ^cgi-bin/miva(.*)$ /mm5/merchant.mvc$1 [R=301]
> The first rule properly rewrites when browsing to site/random/miva?
> directives=here&more=here, while the second rule refuses to rewrite.
> I've had a terrible time finding much reliable information on the
> issue, I've found one website that  claims mod_rewrite will not work
> on a directory that is a scriptalias, because scriptalias is a
> 'deeper' apache module, and therefor takes precedence  before
> mod_rewrite will kick in. My personal experience on this leads me to
> believe this could be true, but since I was only able to find the
> information on one site, with nothing to back it up, I figured i'd
> see what you guys had to say about that.

Where is the .htaccess located?  In the DocumentRoot or in the cgi-bin

The easiest fix for this would be to put the RewriteRule's in the
httpd.conf instead of in .htaccess (with appropriate path


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message