Link to home
Start Free TrialLog in
Avatar of LaBowski
LaBowskiFlag for United States of America

asked on

Page redirects in htaccess file to remove one of a few subdirectories in URL

Hello everyone

I'm trying to implement a generic rewrite rule but am running into some problems. For example, the old url is test.com/auditorium/events/details/happy-hour and the new one is test.com/events/details/happy-hour i.e. "/auditorium" is should be removed from the new url. There are a few posts about this, but nothing to create the redirect correctly.

This is what we currently have:
rewritecond %{request_uri} ^/auditorium/events/details/ [nc]
rewriterule ^(.*)$ http://www.test.com/events/details/$1 [r=301,nc]
From what I can tell, the server isn't even hitting the rewritecond properly because the old url is still showing in the address bar.

Not sure if this matters, but the site is in Joomla. Thank you!
ASKER CERTIFIED SOLUTION
Avatar of arober11
arober11
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LaBowski

ASKER

Thank you!