problem with / htaaess

Discussion in 'Site & Server Administration' started by bharatmax, Sep 17, 2011.

  1. #1
    How to redirect all pages like

    domain.com/sample --> domain.com/sample/ using htaacess?
     
    bharatmax, Sep 17, 2011 IP
  2. Icecube_media

    Icecube_media Peon

    Messages:
    656
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    I didn't get. Are you trying to move your pages from one domain to another or what ?
     
    Icecube_media, Sep 17, 2011 IP
  3. bharatmax

    bharatmax Member

    Messages:
    650
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #3
    No.Its same domain. recently I have changed parmalink structure in wordpress just by putting "/" at the end.
    Now Google webmasters showing errors. I don't want to change back.so How to forward like I asked above ?
     
    bharatmax, Sep 17, 2011 IP
  4. bharatmax

    bharatmax Member

    Messages:
    650
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #4
    My htaacess is

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress


    I have to add this code somewhere


    RewriteEngine on
    RewriteBase /
    ### CHECK FOR TRAILING SLASH - Will ignore files
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !/$
    RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule ^(.*)$ http://digitalpoint.com $1/ [L,R=301]


    Where can I add..It also seems in my htacess file there are repeated commands.Is it OK.Should I have to remove one of those.
     
    bharatmax, Sep 17, 2011 IP