httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [users@httpd] Rewrite rules question
Date Wed, 22 Apr 2009 22:07:38 GMT
John Oliver wrote:
> A site has the following rules:
> 
> RewriteEngine on
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
> 
> I've been asked to ensure that www.domain.com goes to https://domain.com
> so I tried:
> 
> RewriteEngine on
> RewriteBase /
> RewriteCond %{HTTP_HOST} !^domain\.com$ [NC]
> RewriteRule ^(.*)$ https://domain.com/$1 [L,R=301]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
> 
> And:
> 
> RewriteEngine on
> RewriteBase /
> RewriteCond %{SERVER_PORT} !^443$
> RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
> 
> Neither of those is working. Nothing is getting written to any logs. I'm
> not certain that you can or can not "stack" rules like that.
> 
You could start by having a look at the RewriteLog and RewriteLogLevel 
directives.  It's not really possible that nothing would get logged, 
unless you are not even hitting the rules above.
Also, *where* are the above directives ?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message