Hello, php url. I have a question: & nbsp; put my houtai directory under view, not the root directory. If you enter iphoutai & nbsp; 404 & nbsp; view the Apache log and find the houtai folder in the root directory. If no error 404 is found. & nbsp; what I expect is that the PHP framework parses the houtai folder and goes to the PHP URL.
Hello everyone. I have a problem: my houtai directory is under view, not the root directory. If you enter http: // ip/houtai, 404 is returned to view the Apache log. you can find the houtai folder in the root directory of the server, and then the error 404 is not found. what I expect is that the PHP framework parses the houtai folder and goes to the view folder to find the page. Is there a problem with the configuration? is the URL rewrite rule incorrect?
Online, etc. thank you.
------ Solution --------------------
If you have any questions, let's just say, why should we go around such a circle?
RewriteEngine on
# Directly access the directory without RewriteRule if the directory exists
RewriteCond % {REQUEST_FILENAME }! -D
# If the file exists, access the file directly without RewriteRule. (if the file does not exist or the file does not exist, rewrite it)
RewriteCond % {REQUEST_FILENAME }! -F
# All files that cannot find the actual path should be handed over to index. php for processing.
RewriteRule ^ (. *) $ index. php/$1 [QSA, PT, L]