An error occurred while routing to the redirect address
VM
VM 2017-07-07 11:48:34
0
3
2005

think\Route::rule('my_jump','/face.php');

Tips for errors:

Image.png


VM
VM

的法规发生的撒旦法撒旦法

reply all(3)
Peter_Zhu

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.

  • reply 1. 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")
    VM author 2017-07-08 09:50:05
  • reply Jump to the file in the root directory
    VM author 2017-07-08 09:59:57
  • reply Teacher, 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. . .
    VM author 2017-07-08 11:50:07
  • reply Thank you, Teacher Zhu, for your teaching! ! ! ~~~
    VM author 2017-07-08 11:53:15
VM

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>

VM

http:// is ok

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template