我已经按照htaccess为我的应用生成了永久链接:
6 #Permalinks
7 RewriteEngine on
8 <IfModule mod_rewrite.c>
9 RewriteEngine On
10 #catch potential subpages first
11 RewriteRule ^([a-z-]+)/([a-z-]+)/?$ index.php?page=$1&subpage=$2 [L,NC,QSA]
12 #
13 RewriteRule ^([a-z-]+)/?$ index.php?page=$1 [L,NC,QSA]
14 </IfModule>
是正确的正则表达式:[0-9a-z-]
?
是,要匹配数字,请使用以下规则:
RewriteRule ^([a-z0-9-]+)/([a-z0-9-]+)/?$ index.php?page=$1&subpage=$2 [L,NC,QSA]
RewriteRule ^([a-z0-9-]+)/?$ index.php?page=$1 [L,NC,QSA]
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句