-1
How to make sure that when a person accesses the site, the . htaccess recognizes that the site is on /site
instead of /
, /website where it will contain all the files of the site. And when accessing the URL should open www.site.dev/
instead of www.site.dev/site
Image the folders:
Code I’m using:
<IfModule mod_rewrite.c>
RewriteEngine On
Options All -Indexes
# ROUTER WWW Redirect.
# RewriteCond %{HTTP_HOST} !^www\. [NC]
# RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# ROUTER HTTPS Redirect
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# ROUTER URL Rewrite
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ site/$1 [L]
</IfModule>
I’ve tried to:
RewriteRule (?!^site/)^(.*)$ /site/$1 [L,NC]
RewriteCond %{REQUEST_URI} !folder/
RewriteRule (.*) /site/$1 [L]
Thank you.
Lucius, I had succeeded that way
RewriteRule ^ - [L]
RewriteRule ^/?$ site/ [NC,L,QSA]
can you tell me if it’s a correct format to use?– Tiago
It would be interesting to put the 301 code to "warn" the search engines that it really is something permanent
– Lucius