Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 04:18:39 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149665 Posts in 21100 Topics by 7539 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: when changing the /pages directory, do I need a 301 redirect?  (Read 578 times)
MissyW

Offline Offline

Posts: 42


« on: March 27, 2009, 05:11:40 AM »

I want to change the /pages directory name - I know I can do it via advanced settings.  However, I have existing page content which is indexed in the search engines.   Do I need to create a page redirect in .htaccess file?  If so, can someone help me with the necessary redirectMatch command which would include all sub-directories of the pages directory?
Logged
doc
Guest
« Reply #1 on: March 27, 2009, 07:13:29 AM »

Have you read through this info here:
http://help.websitebaker.org/pages/en/basic-docu/first-steps/adapting-default-settings.php

Christian
Logged
MissyW

Offline Offline

Posts: 42


« Reply #2 on: March 27, 2009, 11:20:43 AM »

Yes - thanks anyway, I read through the documentation.  Which is basically saying, get your act together BEFORE you create your pages ... in a perfect world.   Anyway, I've worked it out.   

So for anyone else wanting to rename the /pages directory after the event (i.e. after the search engines have indexed your content), here is how I did it on my Linux server:

1. On the server I created a duplicate copy of the /pages directory, named say /newpages - just in case someone was trying to log to my site from search results while I was making the changes
2. In wb back-end settings, I clicked on advanced settings and changed the Pages Directory to /newpages
3. I then checked all my page links were working correctly with urls http://www.domain.com/newpages/page.php etc.
3. I edited the .htaccess file using notepad and added the following line of code:
redirect 301 /pages http://www.domain.com/newpages
4. I then checked the redirect was working by following links to .../pages/... to make sure I ended up on .../newpages/...
5. I then safely deleted the /pages directory.

I am no expert on .htaccess or 301 redirects, so perhaps you should check that a 301 redirect is going to work on your server before you embark on this.


 
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!