Answer the question
In order to leave comments, you need to log in
How to set root directory in htaccess?
Good afternoon, I work with a local site, MAMP Pro is installed as a web server
My site is available at localhost:8888/site.ru
If I try to include styles in the index file at link href="template/styles.css" then they , as I see in the console, they are connected to the address localhost:8888/template/styles.css (which gives an error), and not localhost:8888/site.ru/template/styles.css as I need
How to do it in .htaccess to Is everything connected to the correct address?
Current htaccess content:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php/$1 [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