Get exclusive CAP network offers from top brands

View CAP Offers

Reply To: How to set a re-direct for all sub-pages?

[bsa_pro_ad_space id=2]
#796468
Cooky
Member
livegirl1;199109 wrote:
Hi Gary,

Thanks for replying!

It’s not the whole site, it’s some sub-directories. The dashes were just an example – I want to change the title of sub-pages from for example main.html to livedealers.html etc.

Will htaccess also handle the wrong spelling of my sites? Or any old sub-pages that I might have changed in the past?

Thanks,
livegirl :)

Hi Livegirl1,

The .htaccess file is a text file which resides in your main site directory and/or in any subdirectory of your main directory. There can be just one, there can be a separate one in each directory or you may find or create one just in a specific directory.

Any commands in a .htaccess file will affect both the directory it is in and any subdirectories of that directory. Thus if you have just one, in your main directory, it will affect your whole site. If you place one in a subdirectory it will affect all the contents of that directory.

You could use a redirect meta tag in the head of the old pages to bring users to the new ones, but some search engines may not follow the redirect and others frown upon it.

Here’s how to do it;

Enter this line in your .htaccess file:
Redirect permanent /oldfile.html http://www.domain.com/filename.html

You can repeat that line for each file you need to redirect. Remember to include the directory name if the file is in a directory other than the root directory:
Redirect permanent /olddirectory/oldfile.html http://www.domain.com/newdirectory/newfile.html

(this is wrapping here but needs to be on a single line)

If you have just renamed a directory you can use just the directory name:
Redirect permanent /olddirectory http://www.domain.com/newdirectory

If you have backlinks to your site this will also fix this issue, and any future issues.

Yes and yes to your last 2 questions,