B
B
biryukovm2020-01-04 01:12:17
Nginx
biryukovm, 2020-01-04 01:12:17

How to change the path to the style file as if it is in the root of the site?

Hi all.
Tell me how you can set it up to the folder so that it seems that it is at the root I
have a self-written CMS project and I created a separate folder for the "themes" site template .ru/site/themes/css/style.css" To display and work on the site along the path "site.ru/css/style.css" - That is, we hide this data "site/themes/" Maybe you can use .htaccess or PHP method Preferably with examples so it will be clearer and fewer questions

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2020-01-04
@politon

RewriteRule ^/site/themes/(.+)$ http://site.ru/$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question