简体   繁体   中英

Rewrite rule to an other domain keeping rest of url

This is what I need to do:

website EXAMPLE with url

/?VVWM=$59095-K9T-50U00-VX0U**|jDDQvcZbTESbGqI2AJ8Iww|dIWecCGiGUive6I2AJ8Iww||||1|0$&utm_source=followup-offerte&utm_medium=email&utm_campaign=VVWM

has to redirect to:

http://www.sluitsnel.nl/goedkope-scooterverzekering/?VVWM=$59095-K9T-50U00-VX0U**|jDDQvcZbTESbGqI2AJ8Iww|dIWecCGiGUive6I2AJ8Iww||||1|0$&utm_source=followup-offerte&utm_medium=email&utm_campaign=VVWM

So the indication for this redirection is:

http://www.goedkope-scooterverzekeringen.nl/?VVWM=$59095-K9T-50U00-VX0U

Thanks in advcance!

Greetings, Ivar

Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^(www\.)?goedkope-scooterverzekeringen\.nl$ [NC]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+\?(VVWM=$59095-K9T-50U00-VX0U[^\s]*) [NC]
RewriteRule ^ http://www.sluitsnel.nl/goedkope-scooterverzekering/?%1 [R=301,L,NE]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM