Link to home
Start Free TrialLog in
Avatar of codeEater
codeEater

asked on

modRewrite - server redirect instead of http redirect


Hi all

I have the following rewriterule that will obviously redirect from http://www.mydomain.co.uk/thisPage to http://www.mydomain.co.uk/cgi-bin/food.cgi?Wish=FFFF00500080000002171957 

ReWriteRule ^thisPage     cgi-bin/food.cgi?Wish=FFFF00500080000002171957 [L]

I think it's possible to redirect the user on the server so that the URL remains as http://www.mydomain.co.uk/thisPage.  I believe this will mean search engine spiders will index the search engine friendly URL rather than the redirected URL.

What do I need to add/change?

thanks
Avatar of mrielf
mrielf

Remove [L] from end of your RewriteRule
or you have another rewrite rule after this?
Avatar of codeEater

ASKER


yeah I have series of these rules, like this:

ReWriteRule ^thisPage            cgi-bin/food.cgi?Wish=FFFF00500080000002171957 [L]
ReWriteRule ^AnotherPage      cgi-bin/food.cgi?Wish=FFFF00500081000002171957 [L]
ReWriteRule ^somPage           cgi-bin/food.cgi?Wish=FFFF00500082000002171957 [L]
ReWriteRule ^DifferentPage     cgi-bin/food.cgi?Wish=FFFF00500083000002171957 [L]

Any ideas mrielf? or anyone...
SOLUTION
Avatar of mrielf
mrielf

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

Yeah the web pages have links such as www.domain.co.uk/cgi-bin/food.cgi?Wish=FFFF00500080000002171957.

These rewrite rules are just for Spiders so they will be submitted to search engines.

I was seeing the URL actually replaced in the browser address bar rather than having the original link displayed i.e www.domain.co.uk/thisPage

Sorry this is new to me, I'm learning fast.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oops the assisted answer should be the accepted.

I split the points so others landing on this solution will take notice of the very helpful link you posted.

Thanks mrielf