1

Is it possible to do the following URL rewrite (not redirect) with htaccess?

mypage.com/en/example/example/index.php to mypage.com/en/example

I have also enabled URL rewriting in Joomla config, but I don't know if this has any effect on this.

I tried something like below, but its not working:

RewriteRule ^http://www.mypage.com/en/example/example/index.php$ 
http://www.mypage.com/en/example [L]
1

You can do it like this:

RewriteRule ^/?en/example/example/index.php$ en/example [R=301,L] 

or like this:

RewriteCond %{REQUEST_URI} ^/en/example/example/index.php
RewriteRule (.*) en/example [R=301,L]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.