thinkphp5+apache2.4重写URL

<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
#RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
RewriteRule ^(.*)$ index.php [E=PATH_INFO:$1,QSA,PT,L]

#论坛
RewriteRule ^/1111.html$ /news [L,R=301]

#add by hjwen
redirect 301 /aaa /bbb

RewriteRule ^news/xxx$ index.php?a=shows&catid=11&id=22 [NC,L]

</IfModule>

原文地址:https://www.cnblogs.com/pangchunyu/p/11796838.html