URL Redirection

Discussion in 'Search Engine Optimization' started by ashutoshksingh, Feb 7, 2014.

  1. #1
    Redirect all format of url to (https..And where i can upload the file.When i tried through c panel i got redirection loop.

    Thanks
     
    ashutoshksingh, Feb 7, 2014 IP
  2. BCRed

    BCRed Active Member

    Messages:
    249
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #2
    RewriteEngine On
    RewriteCond %{HTTP} on
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    Code (markup):
    You want to make a new text files and name it .htaccess (you'll likely need to rename on your server). Upload it via FTP to the root public_html directory of your site
     
    BCRed, Feb 8, 2014 IP
  3. aap

    aap Well-Known Member

    Messages:
    1,802
    Likes Received:
    39
    Best Answers:
    2
    Trophy Points:
    120
    #3
    You should use the https protocol if you have a SSL certificate and have installed it correctly. You can force your website to use the https protocol by creating or modifying an .htaccess file in the root folder (public_html). Add following code in .htaccess file
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    Code (markup):
     
    aap, Feb 8, 2014 IP