Forum Moderators: phranque
So, go into your script and find the block that outputs the ugly URLs. Modify it into the new look you want.(i.e. /widgets/yellow/6754.html)
Ok, now the SE sees a nice URL, but it doesn't exist. This is where mod_rewrite comes in.
RewriteRule ^widgets/(.*)/(.*)\.html$ /script.php?color=$1&id=$2 [L]
That will rewrite a request for
/widgets/yellow/6754.html
to
/script.php?color=yellow&id=6754
...where script.php is your main script. Of course, this is just an example and your parameters are probably different. But, you should get the idea.
Regards,
Birdman
PS: Welcome to WW!
You should change the code to make it a redirect like this
RewriteRule ^/e_brand/([^.]+)\.html$ [b]http://www.yourdomain.com[/b]/e_brand.php3?e_classcode=$1 [[b]R=301,[/b]L]
See the references cited in our forum charter [webmasterworld.com] for more information.
Jim