[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-httpd-users
Subject: Re: [users@httpd] Redirect URLs using mod_rewrite
From: David Blanco <david.blanco () publicinet ! net>
Date: 2006-12-28 15:21:44
Message-ID: 4593E108.5080303 () publicinet ! net
[Download RAW message or body]
Hi!
Stefan Antonelli escribió:
> i would like to use apaches mod_rewrite to redirect some URLs to its new
> Location. I have to change this:
>
> http://www.doamin.de/subdir/foo.php?id=1234
>
> into this:
>
> http://www.domain.de/subdir/bar.php?newid=1234#sameid1234
>
> I've tried out this and a lot of variants but none of them worked for me:
Are you sure that mod_rewrite is working (RewriteEngine On)?
> RewriteRule ^/subdir/foo.php\?id=(.*) /subdir/bar.php?newid=$1#sameid$1 [R]
>
> Any suggestions for me?
Take a look at the RewriteBase directive in the mod_rewrite docs
Try something like this:
> RewriteBase /subdir
> RewriteRule foo\.php\?id=([0-9]+)$ bar.php?newid=$1#sameid$1
Hope this helps...
Greetings
--
David Blanco - Programación y sistemas
Publicinet (Publicidad-Cine-Internet, S.L.)
Urzaiz, 71, entlo, izda. -- 36204 Vigo
Telf 902.014.606 -- http://www.publicinet.net
---------------------------------------------------------------------
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic