Results 1 to 12 of 12

Thread: Changing URL Structure

  1. #1
    Registered Mike's Avatar
    Join Date
    May 2003
    Location
    UK
    Posts
    2,755

    Changing URL Structure

    Hi all,

    On one of my sites, my articles are located in the root. It's getting bigger though, so really I'd like to put them in a seperate folder. However, they all are getting reasonable search engine traffic, so could anyone say what would be the best way to change them?
    Don't you just love free internet games ?

  2. #2
    Senior Member Kyle's Avatar
    Join Date
    Jun 2003
    Location
    Chicago
    Posts
    840
    Setup 301's for each page to the new location. It is a pain in the ***, but the only real solution.

    Leave the old pages with the 301's up for a year or so, then take the old pages down.

    Also, there is php or asp code available to apply a 301 right on the page. Nothing is needed to be done in the server config.
    Kyle

  3. #3
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    Well, you could do rewriting or a SEF setup that keeps them with the same URL but moves them elsewhere.

    The simplest URL rewrite setup would be to take all requests for /article/* and instead look for /*
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  4. #4
    Registered Mike's Avatar
    Join Date
    May 2003
    Location
    UK
    Posts
    2,755
    But a 301 would work? Does that mean that all links to site.com/article.php will count towards site.com/directory/article.php? Will it guarantee that rankings won't be affected?

    Thanks...
    Don't you just love free internet games ?

  5. #5
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    301's aren't 100%. Just do a rewrite.

    RewriteEngine On
    RewriteRule ^(.*).php /directory/$1.php

    of course that'd mean you'd have to move your index.php file to /directory/ as well... unless all articles had a common naming convention.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  6. #6
    Registered
    Join Date
    Aug 2006
    Location
    Sacramento, CA
    Posts
    208
    Chris' suggestion would change your directory structure but not your URL structure (articles would now be located in a different folder but still accessed as before). Is this what you are trying to accomplish, or are you trying to actually change your URL structure as the title suggests?

    If you plan on changing the URLs, a 301 redirect is the best way since it should preserve incoming links etc, but nothing is guaranteed and rankings may certainly drop. I would not recommend doing this unless you have to for some reason.
    ________
    Mflb
    Last edited by rpanella; 03-17-2011 at 10:49 AM.

  7. #7
    Registered Mike's Avatar
    Join Date
    May 2003
    Location
    UK
    Posts
    2,755
    Quote Originally Posted by Chris View Post
    301's aren't 100%. Just do a rewrite.

    RewriteEngine On
    RewriteRule ^(.*).php /directory/$1.php

    of course that'd mean you'd have to move your index.php file to /directory/ as well... unless all articles had a common naming convention.
    I'm not that familiar with regular expressions, but isn't there something which says look for a string that doesn't have certain characters? Could you manipulate it to ignore it if it's index.php?
    Don't you just love free internet games ?

  8. #8
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    You could probably make it ignore any file that begins with the letter I... probably the whole word but that'd be a long expression.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  9. #9
    Registered Mike's Avatar
    Join Date
    May 2003
    Location
    UK
    Posts
    2,755
    Ah right, and this method should mean that rankings aren't affected?
    Don't you just love free internet games ?

  10. #10
    Registered Dan Morgan's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    283
    Correct.

    I am facing a similar dilemma with a well established 4 year old site. I want to switch from using the CMS yet I am stuck with 1,500 existing links all (rewritten) based on the particular structure from the CMS. They all share a single unique numeric identifier which I could build into the new system but it will be a pain.

  11. #11
    Registered Mike's Avatar
    Join Date
    May 2003
    Location
    UK
    Posts
    2,755
    Are you still going to move to a rewrite then Dan?
    Don't you just love free internet games ?

  12. #12
    Registered Dan Morgan's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    283
    Quote Originally Posted by Mike View Post
    Are you still going to move to a rewrite then Dan?
    Yep, in a way.

    As Chris says 301's are not 100% effective and will be a time intensive process. I value the existing external (deep) links so would not want to eventually remove those 301's as those sites linking will not adhere to 301's in any shape or form.

    My plan, is to mirror the existing URL structure within the new CMS so all existing links work, and for new pages remove an unrequired alphanumeric elements and replace it with an alphanumeric representation of the page title.

    Currently:

    http://www.domain.com/content/view/20/498

    Only the final integer, 498 is used in identifying the article row (and will be in the new custom CMS), and 20 represents the category.

    Moving forward existing links will work as:

    http://www.domain.com/content/view/20/498

    But new ones will be structured:

    http://www.domain.com/a/articlename/20/500/

    or

    http://www.domain.com/20/500/a/articlename/

    "articlename" may be discarded when rewriting and the page pulled will be based on a combination of '20', '500' & 'a', depending on the scale and the complexity of the new CMS. I am currently weighing up the pros and cons of a translation table to enable just articlename for new urls and no surplus numbers.

Similar Threads

  1. having a real dilemma deciding on navigation structure, need your help
    By deronsizemore in forum General Management Issues
    Replies: 0
    Last Post: 09-19-2006, 06:57 PM
  2. Changing Domain Names
    By asphalt in forum Domain Names
    Replies: 3
    Last Post: 01-18-2006, 09:17 AM
  3. Site structure question
    By agua in forum General Promotion
    Replies: 3
    Last Post: 12-23-2005, 09:52 AM
  4. Changing Domain Names
    By asphalt in forum Domain Names
    Replies: 3
    Last Post: 04-22-2005, 01:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •