Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 09-12-2008, 11:03 AM   #1
HyperActive Warrior
 
Join Date: Jan 2005
Location: , , .
Posts: 207
Thanks: 0
Thanked 2 Times in 2 Posts
Default Apache mod_rewrite url question

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
johlum is offline   Reply With Quote
Old 09-12-2008, 12:36 PM   #2
Persistent Warrior
War Room Member
 
zortag's Avatar
 
Join Date: Jan 2007
Location: San Diego, CA, USA.
Posts: 100
Thanks: 2
Thanked 6 Times in 5 Posts
Default Re: Apache mod_rewrite url question

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');
?>

Get US Facebook Fans for your fan page
Get Unlimited Relevant Backlinks with Neurolinker.com
zortag is offline   Reply With Quote
Old 09-12-2008, 12:42 PM   #3
HyperActive Warrior
 
Join Date: Jan 2005
Location: , , .
Posts: 207
Thanks: 0
Thanked 2 Times in 2 Posts
Default Re: Apache mod_rewrite url question

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
johlum is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum

Tags
apache, modrewrite, question, url

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 03:12 PM.