Redirect help

Status
Not open for further replies.

GlicIT

New Member
Hi all

Long time lurker, first time poster.

I'm trying to find a neat (regex) way to replace an ampersand (&) with 'and' in the top level directory only and also to convert it to lower case using .htaccess

e.g. Visitor types domain.tld/Bread&Butter/IsCheap.php and is redirected to domain.tld/breadandbutter/IsCheap.php
Ditto with domain.tld/Black&White and so on.

As there are so many top level directories it would be too much hassle to add a line for each e.g. Redirect /Bread&Butter http : // domain.tld/breadandbutter/ [R=301,L]

I tried Redirect ^(.*)\&(.*)$ $1and$2 [R=301,L] for the ampersand bit but it fails and I haven't a clue where to begin with the lower case issue.
 
Status
Not open for further replies.
Top