Answer the question
In order to leave comments, you need to log in
What should I fix in .htaccess to open non-root folders?
Uploaded the required script to the site in the site/folder1 folder.
When accessed in a browser, it does not get what is expected.
But, if you remove .htaccess which is in the root folder, then everything starts to work well. Except for the site itself.
This is what the file looks like now:
# Initialization
AddDefaultCharset utf-8
Options -Indexes
RewriteEngine on
# HTTPS redirect if available
#RewriteCond %{HTTPS} !=on
#RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
# Hide text files
RewriteRule ^.htaccess$ - [F]
RewriteRule ^credits.txt$ - [F]
RewriteRule ^readme.txt$ - [F]
RewriteRule ^license.(.*).txt$ - [F]
# Remove trailing slash from URLs
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ /$1 [R=301,L]
# Sitemaps
RewriteRule ^sitemap(.*).xml$ ./cache/static/sitemaps/sitemap$1.xml [L]
# Engine routing
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php [L]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question