Jump to content

Http To Https Redirect


dartsuresh

Recommended Posts

Hi,

i need a help.already we have mode rewrite rule RewriteRule ^(.*).html$ index.php?set=$1

this rule change html url to php now in this i need to add a condition https redirect how with this existing condition can i add new feature.

 

I tried to changed htaccess file but after my change my site not working properly.

My old htaccess working correctly new one not working.

 

my project is zend frame work plzz help

 

Old one

RewriteEngine On

RewriteRule ^(.*).html$ index.php?set=$1

 

New One

RewriteEngine On

RewriteCond %{HTTPS} !=on

RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteRule ^(.*).html$ index.php?set=$1

Link to comment
Share on other sites

No just i need only 2 rules

1)Http to https

2)^(.*).html$ index.php?set=$1

 

when i use this https redirect my old rule not working

My old what it doing is all links in my site with html extention only after the page request change that html to php extention see in my 2 point when i use RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] rule not working. When am in login page page redirect https properly am happy then i try to login the page comes again the same page its not proceed futher process. We are using MVCpatten index.php page handle the request and get the page with help of controller and templates . Am struggle how can i proceed further.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.