Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I moved my website to a new CMS and some of my URLs look different now, so I want to delete a part of incoming URLs so that links to my page still work properly.

The old URL looks like:

I want to get rid of the MY-FORUM, so it looks like:

After reading through different posts I tried the following:

RewriteRule ^MY-FORUM/(.*) /$1 [R=301,L]

Which gives me back an error message stating:

Infinite loop detected in JError

(I´m using joomla)

What is causing this?

share|improve this question

migrated from Nov 6 '11 at 23:46

This question came from our site for system and network administrators.

2 Answers 2

I guess you are defining it in the <VirtualHost>, so the pattern must have a leading slash:

RewriteRule ^/MY-FORUM/(.*) /$1 [R=301,L]
share|improve this answer
Although if the original rule didn't match then presumably the OP wouldn't be getting an "infinite loop". – w3d Oct 31 at 21:11

The fact that you are getting a Joomla error would suggest that you are already getting past mod_rewrite. By itself, the above directive should not generate a redirect loop - assuming you don't have URLs that start /MY-FORUM/MY-FORUM/?

However, Joomla itself uses mod_rewrite, so it's possible there is a conflict with other directives. Since this is an external redirect it should come near the start of your script, after the RewriteEngine On directive and before any of Joomla's internal rewrites.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.