Thursday, September 22, 2011

Apache rewrite rule help?

The only directory structure to change is browse to parts. How do I apply a rule in apache to successfully redirect.



Old

site.com/browse/games/en1873

New

site.com/parts/games/en1873



Apache rewrite rule help?
Quite simple. Just use:



RewriteRule ^/?old_directory/([a-z0-9/.]+)$ new_directory/$1 [R=301,L]





So in your case the following will work good:



RewriteRule ^/?browse/games/([a-z0-9/.]+)$ parts/games/$1 [R=301,L]





Apache rewrite rule help?
Go to http://www.addedbytes.com/ and look for the cheat sheets. There's a great cheat sheet for Apache rewrite that will help you with that.
go to wikipedia and read mod rewrite section



then follow the external link
  • follow the advise of
  • myspace graphics
  • No comments:

    Post a Comment