![]() | | ||||||||
| | #1 |
| HyperActive Warrior Join Date: Jan 2005 Location: , , .
Posts: 207
Thanks: 0
Thanked 2 Times in 2 Posts
|
Is it possible to do this using the mod_rewite capability. Anytime any application on my server wants to send a visitor to a url say: http://www.theirdomain.com I force it to go to http://www.theirdomain.com/12345/tips or http://www.theirdomain.com/index.php?abcdefg12345 And if so, would it look something like this: RewriteCond %{HTTP_HOST} !^www.theirdomain.com RewriteRule ^/(.*) http://www.theirdomain.com/12345/tips thanks Ernie |
| | |
| | #2 |
| Persistent Warrior War Room Member Join Date: Jan 2007 Location: San Diego, CA, USA.
Posts: 100
Thanks: 2
Thanked 6 Times in 5 Posts
|
Can you change the destination URL in the application on your server? Or do you own the destination URL? I think one of these is required to make it work. If you can target a file on your own server then you can also do this in PHP: targetfile.php on your server contains: <?php header('Location: http://www.theirdomain.com/12345/tips'); ?> |
| | |
| | |
| | #3 |
| HyperActive Warrior Join Date: Jan 2005 Location: , , .
Posts: 207
Thanks: 0
Thanked 2 Times in 2 Posts
|
Jeff, I had just posted this when I thought, " I should just ping Jeff and ask him, I bet he knows how." Too funny. I don't own the url, it's an affiliate link. Here's why I asked. I'm using OpenX on our VPS and for some reason it strips off the number 12345 (www.domain.com/12345/tips) when the ad is clicked on and sends the visitor to www.domain.com/tips. The ad is served via javascript to another domain on our VPS, but not the domain OpenX resides on. No word from anyone on their forum as to why or how to fix it so I thought the rewrite in Apache might work - for the time being. I want to force those clicks to go to www.domain.com/12345/tips Ernie |
| | |
![]() |
|
| Tags |
| apache, modrewrite, question, url |
| Thread Tools | |
| |
![]() |