"Ask" Apache Rewrite path error
The DocumentRoot path to the virtual machine is/VAR/WWW/HTML/DIR1/DIR2
The rewrite rule is written in the. htaccess file.
Rewriteengine on
Rewritebase/
Rewriterule rewrite.html index.php
This time, access is normal.
If you change to:
Rewriteengine on
Rewritebase/
Rewriterule rewrite.html index.php [p,l]
Error will occur, Chrome browser returns:
The requested url/var/www/html/dir1/dir2/index.php is not found on this server.
It's supposed to be 404, right?
What is the cause of this error and what should be done?
------Solution--------------------
P (Force proxy) enforces the use of proxy forwarding.
L (last rule) indicates that the current rule is the final rule, stopping the rewrite of the rule after parsing.
Don't understand why P
------Solution--------------------
Reference:
reference: Rewriterule rewrite.html index.php [NC]
Test with NC Modification
Thanks, I'll try the effect.
How is it
------Solution--------------------
Reference:
Reference: P (Force proxy) enforces the use of proxy forwarding.
L (last rule) indicates that the current rule is the final rule, stopping the rewrite of the rule after parsing.
Don't understand why P
I'm not telling you, I don't really understand.
I am because of a project, just began to learn rewrite, very white.
The addition of P here is seen in some examples.
But, anyway, why did you add p to this problem?
Delete the p.