Forum Moderators: phranque

Message Too Old, No Replies

another newbie 301?

         

loversinc

2:07 pm on Sep 11, 2008 (gmt 0)

10+ Year Member



Hi

I have spent ages looking at forums and the posts on this one and nothing seems to work.
I want to redirect traffic from http://www.example.com/racing games to http://www.example.com/car-games

This is the latest code I have tried:

RewriteEngine On # Turn on the rewriting engine

RewriteRule ^free-online-games-player/racing-games.html/?$ http://www.example.com/car-games.html/ [R=301,NC,L] # Permanent Move

By not work I mean, the traffic is not redirected, there are no errors.

Thanks

[edited by: jdMorgan at 2:28 pm (utc) on Sep. 11, 2008]
[edit reason] Use example.com please [/edit]

jdMorgan

2:36 pm on Sep 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




# Turn on the rewriting engine
RewriteEngine on
#
# Permanent Move
RewriteRule ^racing-games\.html/?$ http://www.example.com/car-games.html [NC,R=301,L]

  • Comments must be on separate lines.
  • Do not add a "/" after ".html" -- That results in a badly-formed URL. If your current URLs end in ".html/", then you need to (slowly) start redirecting them to get rid of those trailing slashes.
  • I assumed that your server is already set up to allow and enable mod_rewrite.
  • Completely-flush your browser cache before testing. Otherwise, your test results will be invalid and inconsistent.

    See our Forum Charter and the mod_rewrite documentation at apache.org for more information.

    Jim

  • loversinc

    3:16 pm on Sep 11, 2008 (gmt 0)

    10+ Year Member



    Thanks a million Jim, is now working! and fortunately my current URLs don't end in ".html/"