Re: Address rewriting with mod_rewrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 6, 2008 at 9:31 AM, Mauro Sacchetto
<mauro.sacchetto@xxxxxxxx> 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@xxxxxxxxx

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux