2

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

http://www.parsilatex.com/joomla/index.php
http://www.parsilatex.com/joomla/index.php/1391-09-23-16-04-58
http://www.parsilatex.com/joomla/index.php/1388-06-28-13-55-06/214-thumbnailsinlofinxepersian
http://www.parsilatex.com/joomla/index.php/about-us

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?

2
  • 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 :) Aug 2 '14 at 13:50
  • @WilliamDavidEdwards: Thanks, but it doesn't work. Aug 2 '14 at 19:28
1

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

http://www.parsilatex.com/joomla/index.php/1391-09-23-16-04-58

...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.

18
  • 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 '14 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 '14 at 22:22
  • Thanks again, but your new updated answer doesn't work, as well:-( Aug 3 '14 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 '14 at 15:47
  • Ok, so I'm awaiting your solution:-) Aug 3 '14 at 17:14

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.