C
C
cursor_pointer2021-01-18 08:49:59
htaccess
cursor_pointer, 2021-01-18 08:49:59

How does RewriteRule work in this case?

I decided to understand in detail how htaccess works.
Structure like this:
600520573b2f1455974069.png
For example URL: project1.local/helloworld

Why is there an internal server error in this case? Can't start with an absolute path?

RewriteEngine On
RewriteRule . /index.php


Also a mistake. Why doesn't the redirect to /test/index.php work?
RewriteEngine On
RewriteBase /test
RewriteRule . index.php

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2021-01-18
@shambler81

the redirect directive to the php index is different.
as usual, it already exists. in the apache config
DirectoryIndex index.php index.html index.htm
with such a directive, without even entering the name of the file, the web server will try to execute
them. The priority of the files is their order.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question