A
A
Alinw2020-10-01 13:51:41
htaccess
Alinw, 2020-10-01 13:51:41

How to redirect without losing files?

When following the site.com/gofolder link, you need to redirect to site.com to avoid this:
5f75b38fecc59566660795.png

BUT! this folder with styles, images, etc.
If you do this:

RewriteRule ^gofolder/(.*)$ https://domain.com/$1 [R=301,L,NC]

Then all styles disappear.

I had a question here "Css is not connected on the site, what is the reason?", The reason turned out to be just in this redirect.
I tried a lot of things, but the styles still fly off.

How can this problem be solved?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2020-10-01
@Alinw

in .htaccess at the root of the site

# запрет выдачи листинга
Options -Indexes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question