A
A
Alexander2017-10-26 17:49:46
Apache HTTP Server
Alexander, 2017-10-26 17:49:46

I don't understand how .htaccess works, can you explain?

The /web folder contains styles, etc. /web/css , /web/js.
This is how everything works, the styles are loaded perfectly

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule (.*) /web/$1

Вот так вот стили уже не грузятся на сайте

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule (.*) /web/$1

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php

If I just remove the slash before /web/ in RewriteCond, then the styles are loaded, why is that? How does it even work
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule (.*) web/$1

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php

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