Answer the question
In order to leave comments, you need to log in
Why don't internal links on the site work in Open Server? .htaccess?
Hi guys! They asked me to make changes to a simple site, essentially in HTML / CSS, but with PHP elements - so I installed Open Server for local work. Understood to the stage that the site opens.
But I click on an internal link, for example "Contacts" = 'contacts' - I get a 403 error. In the Apache debug log I see the following:
applying pattern '.*\\.php$' to uri 'contacts', referer: http://stretto.loc/
RewriteCond: input='D:/OpenServer/domains/stretto.loc/public_html/contacts.php' pattern='-f' => matched, referer: http://stretto.loc/
rewrite 'contacts' -> 'D:/OpenServer/domains/stretto.loc/public_html/contacts.php', referer: http://stretto.loc/
add per-dir prefix: D:/OpenServer/domains/stretto.loc/public_html/contacts.php -> D:/OpenServer/domains/stretto.loc/public_html/D:/OpenServer/domains/stretto.loc/public_html/contacts.php, referer: http://stretto.loc/
strip document_root prefix: D:/OpenServer/domains/stretto.loc/public_html/D:/OpenServer/domains/stretto.loc/public_html/contacts.php -> /D:/OpenServer/domains/stretto.loc/public_html/contacts.php, referer: http://stretto.loc/
internal redirect with /D:/OpenServer/domains/stretto.loc/public_html/contacts.php [INTERNAL REDIRECT], referer: http://stretto.loc/
(20023)The given path was above the root path: [client 127.0.0.1:62943] AH00127: Cannot map GET /contacts HTTP/1.1 to file, referer: http://stretto.loc/
adddefaultcharset utf-8
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
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