Need Help Sorting out Redirect Mess!

Discussion in 'Programming' started by jl255, Mar 5, 2008.

  1. #1
    jl255, Mar 5, 2008 IP
  2. NoobieDoobieDo

    NoobieDoobieDo Peon

    Messages:
    1,456
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    I think .htaccess is the best way
     
    NoobieDoobieDo, Mar 5, 2008 IP
  3. jl255

    jl255 Well-Known Member

    Messages:
    2,762
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    185
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    tks but how do i do it?
     
    jl255, Mar 5, 2008 IP
  4. NoobieDoobieDo

    NoobieDoobieDo Peon

    Messages:
    1,456
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    Without having access to your site / .htaccess file I can't really say, it should take about 2 or 3 .htaccess Rewrite rules to get the job done though
     
    NoobieDoobieDo, Mar 5, 2008 IP
  5. LongHaul

    LongHaul Peon

    Messages:
    670
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    Try to add these lines to .htaccess:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^www.mydomain.com$ [NC]
    RewriteRule ^(.*)$ http://mydomain.com/$1 [R=301]
    RewriteCond %{THE_REQUEST} ^.*\/index\.php
    RewriteRule ^(.*)index\.php$ http://www.mydomain.com/$1 [R=301,L]

    This comes from a couple websites I just found, so it's not tested by me. Just change mydomain to your domain name.
     
    LongHaul, Mar 5, 2008 IP