First of all, the entry file is hidden. Now there is no need for manual operation by the user. The framework has added the rewrite file to the framework.
thinkRoute::rule('my_jump','/face.php'); Where is the "/" in "/face.php" parsed? Among the five modes of routing address, there is no such syntax. If you want to route to an absolute address, please write it completely. Otherwise, do not add an extension and strictly follow the path_info rules.
If all the above are correct, you can consider changing a browser and trying again.
reply1. Teacher Zhu, my rewrite file does not work with the default one, which is the first comment, and rewrite is also enabled locally.
#RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
#RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
I searched online and found that both the second comment and the open one are feasible. Is this related to this?
2. Route::rule('routing rule', 'redirect address'); // What I am testing here is local
I followed your instructions and redirected directly to face.php (echo directly in this file) under the root directory (public, the root directory is this folder in the vhost multi-site configuration) based on the route my_jump or myjump (customized). a string), I use Firefox (the result shown in the picture), Google (displays "You have too many redirects")
replyTeacher, I did it on the test server, and it works. I don’t need to change it when rewriting it (provided by the framework). I can also jump to the local root directory file on the site. Maybe my local environment is wrong. . . It seems that I really need to compare it locally and online. . .
First of all, the entry file is hidden. Now there is no need for manual operation by the user. The framework has added the rewrite file to the framework.
thinkRoute::rule('my_jump','/face.php'); Where is the "/" in "/face.php" parsed? Among the five modes of routing address, there is no such syntax. If you want to route to an absolute address, please write it completely. Otherwise, do not add an extension and strictly follow the path_info rules.
If all the above are correct, you can consider changing a browser and trying again.
I configured the rewrite rule to hide the entry file,
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILEN AME} !-f
#RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
#RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
RewriteRule ^(.* )$ index.php [L,E=PATH_INFO:$1]
</IfModule>
http:// is ok