Forum Moderators: phranque

Message Too Old, No Replies

301 redirect after renewing site which had index.php in URL

.htaccess, redirect

         

silvija567

10:21 am on Nov 7, 2011 (gmt 0)

10+ Year Member



HI,

I have this site www.example.com still running on Joomla 1.0 and want to make a new site on Joomla 1.5 or 1.7. The site ranks first in many target fields but has a structure of subsites like this:

www.example.com/index.php/subsite1-/ (yes, it end with an "-" before the "/")
www.example.com/index.php/subsite2/ (and some end just with the "/") and so on.

The renewed site will have the same content on the same domain (i renew because of the design and PHP 5.3 issues with shs404sef). It will have subsites with the same names as the old one, BUT the problem present the URLs, which will now be without the ugly index.php in it.

There are ca. 10 subsites, so it won't take much time.

As I mentioned I rank super in Google mainly for the main domain www.example.com, but several subsites are also indexed AND MY QUESTION IS:

What do i write in the .htaccess file so that I do a page by page redirect of the old index.php including URLs to new URLs without index.php, so that user will be redirected to the new URLs and that I preserve my good ranking?

Could someone please provide me with the whole .htaccess text?

g1smd

12:36 pm on Nov 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That's not how it works here.

You provide an example of the code you think will do the job, and we discuss whether that's the best way and whether you have introduced syntax errors or bugs in your code.