Dear all,
I am a developer and have an account set up on cPanel.
I have 2 environments, a demo subdomain, and the main domain for production.
So example; demo.example.com -> /home/demo/ (outside public_html)
and movies.com -> public_html
I have the following htaccess file:
The purpose of this thread is to seek help. I want to be able to redirect all http requests to https.
On the same server their is another account which handles rewriting URLs. This makes me believe mod_rewrite is working as expected.
Can someone help me please? I want to be able to redirect:
to
to
or
I am a developer and have an account set up on cPanel.
I have 2 environments, a demo subdomain, and the main domain for production.
So example; demo.example.com -> /home/demo/ (outside public_html)
and movies.com -> public_html
I have the following htaccess file:
Code:
RewriteEngine on
<IfModule mod_rewrite.c>
RewriteEngine on
# let the PHP knows that the mod_rewrite module is ENABLED.
RewriteCond %{HTTPS} off
RewriteRule (.*) [URL]https://%[/URL]{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
On the same server their is another account which handles rewriting URLs. This makes me believe mod_rewrite is working as expected.
Can someone help me please? I want to be able to redirect:
Code:
http://demo.example.com
Code:
https://demo.example.com
Code:
http://movies.com
Code:
https://example.com
Code:
https://www.example.com
Last edited by a moderator: