B
B
BarneyGumble2016-09-03 14:16:55
Apache HTTP Server
BarneyGumble, 2016-09-03 14:16:55

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

1 answer(s)
S
SagePtr, 2016-09-03
@SagePtr

Distinguish file paths on the server and in the browser.
phpfaq.ru/newbie/paths

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question