Is a 301 direct possible for internal pages?

Discussion in 'Apache' started by ronmojohny, Feb 15, 2006.

  1. #1
    can I permantly redirect a page to another page on my site? I have 2 pages with the same content, with internal and extenal links pointing to them both. I just want one. Also, I already have an .htaccess to direct domain.com to www.domain.com for the same external link problem, do I put them both in the same .htaccess file?

    Thanks, RonMo
     
    ronmojohny, Feb 15, 2006 IP
  2. fsmedia

    fsmedia Prominent Member

    Messages:
    5,163
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    390
    #2
    Sure, I do it all the time. IT works the same as if you were going from one site to another. Put in in the root, same as others.
     
    fsmedia, Feb 15, 2006 IP
  3. ronmojohny

    ronmojohny Well-Known Member

    Messages:
    729
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    133
    #3
    it worked for one page, so I decided to do the other 6 pages, now none of them work. I edited the .htaccess file with notepad.

    here is the code:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^ezdrivingdirections\.com
    RewriteRule ^(.*)$ http://www.ezdrivingdirections.com/$1 [R=permanent,L]
    RedirectMatch permanent ^/page1.html http://www.ezdrivingdirections.com/google_maps.html
    RedirectMatch permanent ^/page2.html http://www.ezdrivingdirections.com/map24.html
    RedirectMatch permanent ^/page3.html http://www.ezdrivingdirections.com/mappoint.html
    RedirectMatch permanent ^/page4.html
    http://www.ezdrivingdirections.com/maps_on_us.html
    RedirectMatch permanent ^/page5.html http://www.ezdrivingdirections.com/mapquest.html
    RedirectMatch permanent ^/page6.html http://www.ezdrivingdirections.com/yahoo_maps.html
    RedirectMatch permanent ^/page7.html http://www.ezdrivingdirections.com/us_local_map.html

    why won't this work?
     
    ronmojohny, Feb 15, 2006 IP