views:

27

answers:

2

hello - bit of a nightmare. Clients sent out a big email with in links in them which have subsequently changed!

just need to change

forthcoming-events/event/skills-xxx-XXX

to

forthcoming-events/event/skills

so just removing the '-xxx-XXX'. Any help majorly appreciated as struggling to find a solution.

A: 

I'd have thought that something like:

RewriteRule \A/forthcoming-events/event/skills-xxx-XXX/*$       /forthcoming-events/event/skills/$1         [L]

...would do the trick. (That said, I've presumed that the "skills-..." bit is a directory.

middaparka
actually its just a safe URL which needs to be caught by a later rule; RewriteRule ^([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/$ article-01.php [L]the other problem its countless URLs so just need to match -xxx-XXX and remove -xxx-XXX and then continue down to the other rule.
daniel Crabbe
A: 

RewriteRule ^(.*)-xxx-XXX$ $1 [R=302,NC]

the above works to match the rewrite the URLs!

cheers...

daniel Crabbe