httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Khine <>
Subject [users@httpd] Apache mod_rewrite and 301 redirection
Date Wed, 29 Nov 2006 15:54:26 GMT
I am using a ZOPE server behind Apache and already have a mod_rewrite
rule as:

<VirtualHost *:80>
  RewriteEngine On
  RewriteRule ^/(.*)$1
  ErrorLog /var/log/apache2/site_error.log
  CustomLog /var/log/apache2/site_access.log combined
  RewriteLog /var/log/apache2/site_rewrite_log

Now I would like to add the 301 re-direction before the second rule is
taken into effect so that if user types they are
redirected to just the and only then will they be taken to
the site

Can I just have it:

RewriteCond %{HTTP_HOST} ^www\.mysite\.com [nc]
RewriteRule (.*)$1 [R=301,L]
RewriteRule ^/(.*)$1



Many thanks


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