Ok, I’m a newbie… first time asking things here.
I have a domain called example.com
All my website is at the following URL: https://example.com/example.com/inter/pf2/
What I want is the following:
When a user goes to https://example.com show all the content at https://example.com/example.com/inter/pf2/ but the URL keep saying example.com
I’ve tried the following:
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^$ /example.com/inter/pf2/ [L]
But it is not working
EDIT:
This is the .htaccess:
RewriteEngine on
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
RewriteRule ^/?$ %{HTTP_HOST}/inter/pf2/ [L]
2
Answers
With your shown samples, could you please try following. Please clear your browser cache before testing your URLs.
This line:
Means "if HTTPS is not switched on". In other words "only run the rule if connecting over plain "http://".
But your example shows you trying to access an "https://" URL.
You probably just don’t need that condition, but if you were trying to say "if HTTPS is switched on", you need
=
not!=
: