logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



All request redirect to HTTPS

 
Post new topic   Reply to topic    Apache Forum Index -> Apache



View previous topic :: View next topic  
Author Message
nawalsharma



Joined: 01 Nov 2014
Posts: 2
Location: Melbourne, Australia

PostPosted: Sat 01 Nov '14 9:37    Post subject: All request redirect to HTTPS Reply with quote

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: 66

PostPosted: Sun 02 Nov '14 0:58    Post subject: Re: All request redirect to HTTPS Reply with quote

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

PostPosted: Sun 02 Nov '14 11:26    Post subject: Re: All request redirect to HTTPS Reply with quote

Thank you so much "puertoblack2003". It is working perfectly. I appreciate your time and effort. Laughing
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1