Question about Apache Rewrite

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

dually

Established Member
Impact
1
Hi Pros,
For example, my domain is XXXXX.com. I use Apache + php5.2 to host a site.
I'd like people to visit a redirect site(YYYYY.com) using "http://XXXXX.com?http://YYYYY.com", how should I edit the .htaccess file so that it could redirect the url into the real url "http://XXXXX.com/r.php?url=http://YYYYY.com"?
Thanks very much for all u Pros!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^XXXXX\.com [NC]
RewriteRule ^(.*)$ http://www.XXXXX.com/r.php?url=http://YYYYY.com/$1 [L,R=301]

tell me if works
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back