L
L
Lobster2017-07-14 02:02:58
htaccess
Lobster, 2017-07-14 02:02:58

How to remove web/ from url using .htaccess?

Need help. Already waved. Everything seems to be working, but the styles are not connected. Wanted to get rid of the web
folder in the web folder in .htaccess:

RewriteEngine On RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php

.htaccess in site root:
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule ^assets/(.*)$ /web/assets/$1 [L]
RewriteRule ^css/(.*)$ /web/css/$1 [L]
RewriteRule ^js/(.*)$ /web/js/$1 [L]
RewriteRule ^images/(.*)$ web/images/$1 [L]
RewriteRule (.*) /web/$1

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

in the web.php config in 'request' added the line:
'baseUrl'=> '',
Screenshot
d1d215148ce9.png

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