#1
  1. water buffaloo
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Nov 2004
    Location
    Amsterdam
    Posts
    310
    Rep Power
    15

    .htaccess redirect all to new pages


    Hi everybody,
    I got stuck with this task, I need to redirect with htaccess all the pages of my website

    ex: www.mysite.com/pippo-01-01.html to
    www.mysite.com/pippo-01-02.html

    and

    www.mysite.com/mickey-01-01.html to
    www.mysite.com/mickey-01-02.html

    and so on, for all the pages (so I need basically to change the final part and only that of every file, from 01.html to 02.html

    Is there anbody that can help me?

    Thanks in advance
  2. #2
  3. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jan 2007
    Posts
    59
    Rep Power
    13
    Hi

    make sure your RewriteEngine is on.

    Code:
    RewriteEngine On
    Then you could use the following for each one individually:

    Code:
    RewriteRule ^pippo-01-01.html$ pippo-01-02.html [R=301,L]
    Alternatively you could try putting in just one statement to cover it all, something like:

    Code:
    RewriteRule ^([a-z]+)-([0-9]+)-01.html$ $1-$2-02.html [R=301,L]
    I've not tested these and my .htaccess is a bit rusty so let me know if works?
  4. #3
  5. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Dec 2006
    Location
    Tricycle Capital of the World
    Posts
    9
    Rep Power
    0
    To Move a single page
    Redirect 301 /oldpage.html (URL address blocked: See forum rules)

    To Move an entire site
    Redirect 301 / (URL address blocked: See forum rules)
  6. #4
  7. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Mar 2010
    Location
    Honolulu, HI
    Posts
    14
    Rep Power
    0
    O.k, so what's the best way to forward an entire site so I new domain gets credit from old domain?

Similar Threads

  1. 301 redirect and .htaccess file location questions
    By lilyfok in forum Google Optimization
    Replies: 2
    Last Post: Jan 16th, 2006, 04:55 AM
  2. too much content too quickly?
    By deano6410 in forum Google Optimization
    Replies: 5
    Last Post: Aug 11th, 2005, 08:21 PM
  3. redirect to affiliate in cpanel or .htaccess?
    By preikarm in forum Web Design, Coding and Programming
    Replies: 1
    Last Post: Mar 31st, 2005, 05:04 AM

IMN logo majestic logo threadwatch logo seochat tools logo