httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Cicimov <icici...@gmail.com>
Subject Re: [users@httpd] Rewrite rules question
Date Wed, 22 Apr 2009 23:57:50 GMT
The following works for me

RewriteCond %{SERVER_PORT}  ^80$
RewriteRule ^(.*)$ https://www.domain.com.au$1 [R=301,L]


Cheers,

Igor

On Thu, Apr 23, 2009 at 8:07 AM, André Warnier <aw@ice-sa.com> wrote:

> 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