The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other 301 Redirect http to https same page name

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #255753

    Hi, hope someone can help. I have recently installed a SSL Certificate on my site and in the process of creating 301 redirects via the .htaccess file for nearly 400 page urls (to keep Google happy and my page rankings). I thought of using;

    redirect 301 /contact.php
    redirect 301 /services.php

    but it breaks the site. The only solution I have seen is;

    RewriteEngine on
    RewriteCond %{HTTPS} off
    RewriteRule ^contact.php$ [L,R=301]

    The above seems a lot of code to use for each of the 400 pages! is there a quicker way with less code I can use in the .htaccess file?

    Many thanks. Hope someone can advise.


    Maybe this is what you’re looking for?

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    For more help, try Googling “redirect http to https htaccess”.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.