.htaccess issue

Discussion in 'Search Engine Optimization' started by panki90, May 28, 2014.

  1. #1
    My website is opened in 3 version www, non www or index.html what to do now?
    what should i do now firstly i have to need redirect the url through .htaccess or how to do with .htaccess and still my website 16 pages have indexed nedd your help seo experts.
    Thanks
     
    Solved! View solution.
    panki90, May 28, 2014 IP
  2. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    406
    Best Answers:
    21
    Trophy Points:
    295
    #2
    #Force www:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^example.com [NC]
    RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]

    Will sort the www issues by forcing www to show up.

    What is the .html issue? Do you want to keep or remove it?


    N.
     
    Last edited: May 28, 2014
    Nigel Lew, May 28, 2014 IP
    Ryan Viola and John Dave like this.
  3. John Dave

    John Dave Active Member

    Messages:
    873
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    80
    #3
    John Dave, May 28, 2014 IP
  4. panki90

    panki90 Member

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    i want to remove .html issue if it make effect on ranking......
     
    panki90, May 30, 2014 IP
  5. panki90

    panki90 Member

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #5
    Thanks Lew i just want to set my website url to www and want to remove .html version how to do? Please tell me whole process and all the codes where i can set only 1 version (www) version for my visitor and both non www or index.html want to remove permanently.
    please help asap.
     
    panki90, May 30, 2014 IP
  6. #6
    #Force www
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^example.com [NC]
    RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
    RewriteRule ^index\.html$ http://www.example.com/ [R=301,L]

    Try that. I may need to modify that a bit but let me know if it works. If not, just drop me a PM. I will sort it out for you real fast.

    Nigel
     
    Nigel Lew, May 30, 2014 IP
  7. panki90

    panki90 Member

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #7
    Thanks a lot from the bottom of the Heart
    I am a little bit confused don't know How to edit the url in this code. This is the url- www.kullumanalihoneymoonpackage.org you can check and please tell me after the editing the .htaccess file i have to need resubmit the sitemap or not.
     
    panki90, May 31, 2014 IP
  8. BINOY ROY

    BINOY ROY Greenhorn

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #8
    i am sorry i don't know about this.please any one help them.
     
    BINOY ROY, May 31, 2014 IP
  9. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    406
    Best Answers:
    21
    Trophy Points:
    295
    #9
    Nigel Lew, May 31, 2014 IP
  10. Joshie

    Joshie Notable Member

    Messages:
    513
    Likes Received:
    53
    Best Answers:
    1
    Trophy Points:
    255
    #10
    Or:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    Code (markup):
    That worked for me better.
     
    Joshie, May 31, 2014 IP
  11. panki90

    panki90 Member

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #11
    Thanks a lot Nigel
    Redirects working fine there is 1 problem that the site is Auto refreshing i have checked the meta refresh code and delete but there is no effect on Meta refresh so how to do with this i have deleted this, Is it right or wrong or how can i handle with this auto refresh?
    Thanks in Advance Nigel
     
    panki90, May 31, 2014 IP
  12. panki90

    panki90 Member

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #12
    you can check also Lew index.html url is still showing whats next........... non www to www is redirected well and what about meta refresh and in sitemap still 301 error showing in sitemap for the Index.html page need your help...........
    Thanks
     
    panki90, Jun 1, 2014 IP