Web Hosting Talk







View Full Version : htaccess question - converting underscores in URL to hyphens


emills01
10-07-2006, 04:46 AM
I run a web directory and I recently switched directory software. The previous software used underscores in the URLs, and the new one uses hypens. I like the hyphens better but now I have the problem of old links giving 404s when visited.

Is there a simple htaccess fix so that when sometime tries to go to:

www.domain.com/directory_name_here

it *automatically* sends them to:

www.domain.com/directory-name-here ?

Thanks for the help...

Drac
10-10-2006, 09:32 AM
Not quite sure if this one is possible as the URL entered is a client request, not a server request.

Regards,
Drac