Gmane
Gravatar
From: Eric Covener <covener <at> gmail.com>
Subject: Re: Address rewriting with mod_rewrite
Newsgroups: gmane.comp.apache.user
Date: 2008-10-06 13:55:33 GMT (13 weeks, 2 days and 11 minutes ago)
On Mon, Oct 6, 2008 at 9:31 AM, Mauro Sacchetto
<mauro.sacchetto <at> tele2.it> wrote:
> I must translate the following address:
> http://www.giovannifornero.net/index.php?pagina=home
> in the more confortable way:
> http://www.giovannifornero.net
> I tried to put in .htaccess the string:
> RewriteRule ^/index.php?pagina=home$ ^giovannifornero.net  [R=301,NC,L]
> but it doesn't happen anything.
> Is there anything conceptually wrong?
> Are there some mistakes in syntax?
>

The query string (after the question mark) isn't part of what you're
comparing against. To compare against the query string, precede your
rule with
Rewritecond %{QUERY_STRING} pagina=home (and remove the query string part.

The 2nd parameter of your RewriteRule should be a full URL
(host/port/path) or just "/" in this case would work, and should not
have any regex characters like "^" in it.

-- 
Eric Covener
covener <at> gmail.com

---------------------------------------------------------------------
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 <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org