E
E
eosal2102022-02-18 19:00:13
Apache HTTP Server
eosal210, 2022-02-18 19:00:13

The directory opens, not the site, how to fix it ??

Hello guys!
Tell me please, I encountered such a problem that the script directory opens and not itself (website, script), I tried to make edits by type in htassese

RewriteCond %{REQUEST_FILENAME} !-F
    RewriteRule ^([^\.]+)$ $1.php [NC,L]

but I still don’t understand, I’m a beginner, I didn’t understand what the $1.php variable is where it will enter, but if you run the script like this, you will get an error: "
Access denied!
You do not have access rights to this object. The file is not available for reading, or the server cannot read it.
"
But I need the site itself to open by type site.com/login and not site.com/login/main.php, tell me please, I'll attach the screen below, I repeat once again that /login would immediately work without attachments, is this possible?
Thank you!620fc263c0fe3621202861.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey delphinpro, 2022-02-18
@eosal210

https://yandex.ru/search/?clid=1882628&text=apache...
by default, the file should be called index.html or index.php
according to your rule, files without extensions will be opened, that is, /main instead of
/main.php login.php file - it will open as /login

F
FanatPHP, 2022-02-18
@FanatPHP

Stop spamming the same question

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question