Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7799017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:10:20+00:00 2026-06-02T00:10:20+00:00

Redirect the site url http to https..for this i upload .htaccess file in my

  • 0

Redirect the site url http to https..for this i upload .htaccess file in my cpanl public_html root directory.the code of the file as

RewriteEngine On  
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://sitename.in/$1 [R,L]

After i hosted this file also it’s not redirecting my site to https protocol

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T00:10:21+00:00Added an answer on June 2, 2026 at 12:10 am

    I added the following lines of code in the index page of the site

    if($_SERVER["HTTPS"] != "on")
    {
    header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
    exit();
    }
    

    Then the site url redirected to https link

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Iam developing a site in codeigniter.This is my url http://myserver.net/visio/UBwXo . Here h ttp://myserver.net/visio/
This is my htaccess code: RewriteEngine On RewriteBase /visio # Turn on the rewriting
I need to use mod_rewrite to redirect http://www.site.com/new_cars/cars.php?make=brandname to have a friendlier url of
I'd like to redirect all site traffic from all controllers to https while in
After my login my site url (mock url) is http://mysubdomain.Domain.com/Dashboard When I added http://www.mysubdomain.Domain.com/Dashboard
I need help about URL rewriting for image gallery for site. This is problem,
I'm using the following code to redirect traffic to a spesific page (this traffic
I'm making a redirect script for my site, I use htaccess to rewrite the
Is there a .htaccess script I can use to redirect the url of an
I'm trying to create permanent redirects for outdated URL's on my site. For example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.