Forum Moderators: phranque

Message Too Old, No Replies

http://www.example.com/test to http://www.example.com/test/

         

glimbeek

12:32 pm on Mar 29, 2010 (gmt 0)

10+ Year Member



If I wanted to redirect the following:

http://www.example.com/test to http://www.example.com/test/

Would the following code do just that?

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /test\ HTTP/
RewriteRule ^test$ http://www.example.com/test/ [R=301,L]

I don't want http://www.example.com/test?2q432432 rewritten to http://www.example.com/test/?2q432432. Or any other possible options to work. just the version without the / to the version with the /

g1smd

1:45 pm on Mar 29, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It would, because there's no place for 'parameters' in the RewriteCond pattern.

Use Live HTTP Headers to confirm operation. Test with a variety of URLs, www and non-www, and with and without parameters.

glimbeek

6:51 am on Mar 30, 2010 (gmt 0)

10+ Year Member



Thanks for the reply g1smd.