[BlueOnyx:10331] Re: 5108R Web Alias Redirects
Randy Smith
forhire at lewiscounty.com
Wed Apr 25 19:16:51 -05 2012
> I also tried:
> /usr/sausalito/sbin/web_alias_redirects.pl --enabled
So I looked at how this script works and compared to the example found here:
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
The example code works perfectly.
# And for a site running on port 80
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.example.com/$1 [L,R]
The program web_alias_redirects.pl inserts this when toggling. In both cases
the rewrite is commented out for some reason. Remove the comments and the
browser doesn't display the page but it did rewrite the url.
Disabled
#RewriteRule ^/(.*) http://www.example.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} !^1.1.1.1(:80)?$
RewriteCond %{HTTP_HOST} !^www.example.com(:80)?$ [NC]
RewriteCond %{HTTP_HOST} !^example.com(:80)?$ [NC]
RewriteCond %{HTTP_HOST} !^www.example2.com(:80)?$ [NC]
RewriteCond %{HTTP_HOST} !^example.com(:80)?$ [NC]
Enabled
#RewriteRule ^/(.*) http://www.example.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} !^65.172.200.27(:80)?$
RewriteCond %{HTTP_HOST} !^www.example.com(:80)?$ [NC]
I can rewrite web_alias_redirects.pl to work as I want but I'd like to know if
it's aleady been fixed and I simply have an old version. ;)
Thanks,
Randy
More information about the Blueonyx
mailing list