Search Engine Watch
SEO News

Go Back   Search Engine Watch Forums > Search Engine Marketing Strategies > Search Engine Optimization > Dynamic Website and Technical Issues
FAQ Members List Calendar Forum Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
Old 11-01-2006   #1
wackimonki
Member
 
Join Date: Sep 2006
Location: UK
Posts: 30
wackimonki is on a distinguished road
mod_rewrite page to remote server

I want to redirect a page to a remote server. I am having a lot of problems with this, and really appreciate any help.

I have a site where I want to advertise affiliates, as well as providing great information.

I want to point the links to:
/recommends/affiliate1/
/recommends/affiliate2/

etc.

and have them redirect to the affiliate with the affiliate id.

In my .htaccess, I simply added:
RewriteRule ^affiliate1.html$ http://affiliate1\.com/ [R,L]

and it does not work. I have looked at various websites but find it hard to understand.

Can anyone recommend the best way of achieving my goal?
wackimonki is offline   Reply With Quote
Old 11-02-2006   #2
wackimonki
Member
 
Join Date: Sep 2006
Location: UK
Posts: 30
wackimonki is on a distinguished road
If anyone can help me with this I would appreciate it alot!
wackimonki is offline   Reply With Quote
Old 11-02-2006   #3
seomike
Md_Rewrite Guru
 
Join Date: Jun 2004
Location: Dallas, Texas but forever a Floridian!
Posts: 627
seomike is a splendid one to beholdseomike is a splendid one to beholdseomike is a splendid one to beholdseomike is a splendid one to beholdseomike is a splendid one to beholdseomike is a splendid one to beholdseomike is a splendid one to behold
The redirection part is what has me confused.

can you give a better example of the site that will be the final destination.
seomike is offline   Reply With Quote
Old 11-03-2006   #4
eshop600
shop-bright
 
Join Date: Nov 2006
Location: London
Posts: 19
eshop600 is on a distinguished road
Ask you question here http://forum.modrewrite.com/ they have very helpfull people
eshop600 is offline   Reply With Quote
Old 11-07-2006   #5
htaccesselite
www.htaccesselite.com
 
Join Date: Nov 2006
Posts: 14
htaccesselite is on a distinguished road
Quote:
Originally Posted by wackimonki
I want to point the links to:
/recommends/affiliate1/
/recommends/affiliate2/

etc.

and have them redirect to the affiliate with the affiliate id.

In my .htaccess, I simply added:
RewriteRule ^affiliate1.html$ http://affiliate1\.com/ [R,L]
Try

Code:
RewriteEngine On
RewriteBase /
RewriteRule affiliate([0-9]+)\.html$ http://affiliate$1.com [R=301,L]
This will redirect affiliate1.html to http://affiliate1.com correctly for SEO with a 301 redirect (instead of a 302)

affiliate1.html to http://affiliate1.com
affiliate2.html to http://affiliate2.com
affiliate788.html to http://affiliate788.com

Last edited by Chris Boggs : 06-03-2007 at 02:16 PM. Reason: remove keyword stuffed anchor text link
htaccesselite is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off