V
V
Vadim Bulgakov2015-12-01 20:41:16
PHP
Vadim Bulgakov, 2015-12-01 20:41:16

Why doesn't relative addressing work on the site?

When using .htaccess, relative links stop working
. The following happens:
Let's say there is a mysite / admin page
on it there is a link
<a href="page_editor">Настройка страниц</a>
In theory, after sending data from the server, it should work

<a href="мойсайт/admin/page_editor">Настройка страниц</a>

but she looks
<a href="мойсайт/page_editor">Настройка страниц</a>

Index.php is connected via include of various
.htaccess content pages:
AddDefaultCharset UTF-8
RewriteEngine on
RewriteBase /
Options All -Indexes
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME } -d
RewriteRule ^design/(.*)$ design/$1 [L]
RewriteRule ^.*$ [NC,L]
RewriteRule ^.*$ index.php [NC,L]

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2015-12-01
@Silector

What religion does not allow writing like this?
<a href="/admin/page_editor">Настройка страниц</a>

R
romy4, 2015-12-01
@romy4

Well, maybe there is a base on the page that changes the internal urls.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question