V
V
Vladislav Aliev2019-01-10 16:15:44
htaccess
Vladislav Aliev, 2019-01-10 16:15:44

What is wrong in .htaccess settings?

There is the following directory and file structure:

  • htdocs
    • mysite
      • index.php
      • .htaccess

    • anothersite

  • index.php

The .htaccess file has the following code:
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,QSA]
</IfModule>

Problem : when entering the request localhost:8080/mysite/razlichnye-parametry , it is not mysite/index.php that is called, but the root index.php. If there is no external index.php, then a 404 error. What am I doing wrong? I need a redirect exactly to mysite/index.php

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Fedorov, 2019-01-10
@Vladislav_Aliev

May beRewriteBase mysite/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question