Answer the question
In order to leave comments, you need to log in
How to redirect the user from the desired section of the site to the main page?
There are a lot of pages. It is necessary that when the user navigates through these pages, he is automatically redirected to index.html
. when a user visits a page that is in the sitemap folder, I want to be redirected to sitemap/index.html
There are a lot of pages manually, I can’t write on each one.
I tried to use the following code, it works, but it redirects to sitemap/index.html from absolutely all pages, but I only need from those that are in the sitemap folder.
Tried to write: RewriteBase sitemap or RewriteBase /sitemap but got 500(th) error.
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ sitemap/index.html [L,QSA]
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