I have a Joomla website which has been installed in a sub-directory named "joomla" and has pages like the following structures:


Now I'd like to redirect the homepage only to the new Wordpress version of the website, http://parsilatex.com/site/. In other words, I'd just like to redirect the old homepage to the new one. When I use the code below, I get "Page not found" errors.

 Redirect 301 /joomla/index.php http://www.parsilatex.com/site/

How can I accomplish this via my .htaccess file?

  • Try removing the / from the /joomla/index.php so it is joomla/index.php. I'm not sure if it works but it's worth trying :)
    – William
    Aug 2, 2014 at 13:50
  • @WilliamDavidEdwards: Thanks, but it doesn't work. Aug 2, 2014 at 19:28

1 Answer 1


I am assuming that you still want requests that look like:


...to still work. If this is not the case, please leave a comment and I will update the answer.

I have not tested this here, but try:

RewriteEngine On

RewriteCond %{REQUEST_URI} $/joomla/index\.php^ [NC]
RewriteRule .* http://www.parsilatex.com/site/ [R,L]

... my examples that I keep for just this reason have the leading / in $/joomla/index.php^, you can try it without the leading / like this $joomla/index.php^.

... and this may work too...

RewriteEngine On

RewriteRule $/joomla/index\.php^ http://www.parsilatex.com/site/ [R,L]

... and again try it with or without the leading /...

...and see if this gives you what you want. If not, please leave a comment and I will try again.

  • Yes. That's the case, but when I use your code in my .htaccess file located in my public_html folder, I see no changes. Aug 2, 2014 at 19:31
  • @Vahid Damanafshan I updated the answer. Let's see if these work. I am here the rest of the evening unless I go to get ice cream.
    – closetnoc
    Aug 2, 2014 at 22:22
  • Thanks again, but your new updated answer doesn't work, as well:-( Aug 3, 2014 at 5:41
  • @VahidDamanafshan Huh. I have to think on this a bit. It is obviously something stupid/simple that I am missing. We are close.
    – closetnoc
    Aug 3, 2014 at 15:47
  • Ok, so I'm awaiting your solution:-) Aug 3, 2014 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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