Mobile app version of vmapp.org
Login or Join
Rivera981

: How to redirect my homepage installed in a sub-directory to another sub-directory? I have a Joomla website which has been installed in a sub-directory named "joomla" and has pages like the following

@Rivera981

Posted in: #Homepage #Redirects

I have a Joomla website which has been installed in a sub-directory named "joomla" and has pages like the following structures:
www.parsilatex.com/joomla/index.php http://www.parsilatex.com/joomla/index.php/1391-09-23-16-04-58 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, 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 www.parsilatex.com/site/

How can I accomplish this via my .htaccess file?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Rivera981

1 Comments

Sorted by latest first Latest Oldest Best

 

@Jamie184

I am assuming that you still want requests that look like:
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 .* 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^ 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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme