U
U
u0072020-08-18 00:54:20
htaccess
u007, 2020-08-18 00:54:20

Is it possible to move the CMS to a subfolder but keep addressing from the root?

I want to put the CMS in the /october/ folder, but make a redirect so that the pages go from the root: example.com/my_page.html I

wrote the rules:

RewriteCond %{REQUEST_URI} !^/october/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /october/$1
RewriteRule ^(/)?$ october/index.php [L]


Everything is fine, but now the content is available both directly /page, and at the real address /october/page. I couldn't handle the duplication. Tried to close access to /october/ but got a server error. Looks like the poor Apache got stuck in a loop... How do I make the redirect right?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question