Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: All request redirect to HTTPS |
|
Author |
|
nawalsharma
Joined: 01 Nov 2014 Posts: 2 Location: Melbourne, Australia
|
Posted: Sat 01 Nov '14 9:37 Post subject: All request redirect to HTTPS |
|
|
Hello All,
I've just joined the group and new to Apache/php.
I have just assembled a website in Joomla/vertumart and called petslovezone.com.au. I want to redirect all the request such as
1. http://xyz.com to https://xyz.com
2. http://www.xyz.com to https://xyz.com
3. xyz.com. to https://xyz.com
4. www.xyz.com to https://xyz.com
I did some research online and now know I have to change .htaccess "RewriteEngine On" section.
What would be the best code to do all the above.
I appreciate your effort in advance.
Apache Version 2.4.10
PHP Version 5.4.32
cheers
Nawal Sharma |
|
Back to top |
|
puertoblack2003
Joined: 31 Jul 2009 Posts: 121 Location: U.S
|
Posted: Sun 02 Nov '14 0:58 Post subject: Re: All request redirect to HTTPS |
|
|
this is the rule i had to use for htaccess
Code: | RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L] |
|
|
Back to top |
|
nawalsharma
Joined: 01 Nov 2014 Posts: 2 Location: Melbourne, Australia
|
Posted: Sun 02 Nov '14 11:26 Post subject: Re: All request redirect to HTTPS |
|
|
Thank you so much "puertoblack2003". It is working perfectly. I appreciate your time and effort. |
|
Back to top |
|
|
|
|
|
|