[Tutorial] the ApacheRewrite path is incorrect. the DocumentRoot path of the VM is/var/www/html/dir1/dir2rewrite. The rule is written in the. htaccess file. RewriteEngine & nbsp; onRewriteB [Tutorial] Apache Rewrite path error tutorial
The DocumentRoot path of the VM is/var/www/html/dir1/dir2.
The rewrite rule is written in the. htaccess file.
RewriteEngine on
RewriteBase /
RewriteRule rewrite.html index.php
At this time, the access is normal.
If Changed:
RewriteEngine on
RewriteBase /
RewriteRule rewrite.html index.php [P,L]
An error occurs. chrome returns:
The requested URL/var/www/html/dir1/dir2/index. php was not found on this server.
It should be 404, right?
What is the cause of this error and how to handle it.
------ Solution --------------------
P (force proxy) enforces proxy forwarding.
L (last rule) indicates that the current rule is the last rule. after the analysis is stopped, the rule is overwritten.
I don't understand why P
------ Solution --------------------
Reference:
Reference: RewriteRule rewrite.html index. php [NC]
Try modifying with NC
Thank you. let me try it.
How
------ Solution --------------------
Reference:
Reference: P (force proxy) enforces proxy forwarding.
L (last rule) indicates that the current rule is the last rule. after the analysis is stopped, the rule is overwritten.
I don't understand why P
I don't quite understand either.
Because of a project, I just started to learn rewrite, which is very white.
In some examples, P is added.
Yes. In any case, if P is added, this is the case ......
Delete P.