Forum Moderators: phranque

Message Too Old, No Replies

301 Redirects for Multiple Pages

ht access problems

         

cc2283

4:09 am on Jan 30, 2011 (gmt 0)

10+ Year Member



Hello,
I am having a problem with the below redirects. I am attempting to redirect a page to another website, a merchant site with an affiliate link. I have 84 pages on one htaccess file. When I upload my htaccess file, it only picks up the first line which redirects perfectly. why are the remaining 83 ignored? I use a single space and there is no word wrap.

A sample is listed below:



Redirect 301 /grayarea.html [321f0rs4teot1v4bnbkhyoah0b.hop.clickbank.net...]



Redirect 301 /racy.html [b238emmcrjbr1m7dxbr9hbnd50.hop.clickbank.net...]


Redirect 301 /listen1.html [96ac5luaqghk1s6347daol0i1d.hop.clickbank.net...]


Any help is appreciated.
Thanks

jdMorgan

2:22 am on Feb 1, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's no reason why the three lines above should not all work together, as long as the requested URL-paths to be redirected are all different from each other as shown.

So all I can really contribute is to point out that you must delete your browser cache before testing any new server-side code like this. Otherwise, you will likely see previously-cached pages and 'stale' server responses (such as redirects) from your browser's cache.

Do be aware that if any further path-info follows the URL-path prefixes specified above, then that path-info will be appended to the redirect target URL. For example, if racy.htmlfoobar is requested, then the redirect will go to http://b238emmcrjbr1m7dxbr9hbnd50.hop.clickbank.net/?tid=ezfoobar

If this is NOT the desired function, then use RedirectMatch or RewriteRule instead of the Redirect directive.

Jim

[edited by: jdMorgan at 8:11 pm (utc) on Feb 7, 2011]

cc2283

2:22 am on Feb 3, 2011 (gmt 0)

10+ Year Member



Hi,
A little confused, no, very confused! what is foobar? and again why would the first line redirect and the second will not? Please explain for a non techie.
Thanks

jdMorgan

8:12 pm on Feb 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Foobar is only a nonce word to serve as an example.

Jim