httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Moravcik <smorav...@it-con.org>
Subject Re: [users@httpd] rewrite condition problem
Date Tue, 10 May 2011 13:15:46 GMT
Great, thank you very much, it helped. I forgot about drupal's nice URLs 
rewrite rules in .htaccess.
Drupal  has been rewriting ^/free_trial$ to ^/index.php?q=free_trial

so the final working solution is

     RewriteCond %{HTTP_HOST} !^www\.example\.com$
     RewriteCond %{REQUEST_URI} !^/free_trial[1-9]?[1]? [OR]
     RewriteCond %{REQUEST_URI} ^/index.php$
     RewriteCond %{QUERY_STRING} !^q=free_trial[1-9]?[1]?
     RewriteRule ^/(.*) http://www.example.com/$1 [R=301,L]

On 10/05/2011 12:52, Eric Covener wrote:
>> . Any suggestion how i could make this work or any idea,
>> why my rewrite condition doesn't work.
> RewriteLog
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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