投稿 评论 顶部

伪静态配置

佚名 网络安全


localhost/cms/index.php?a=index&m=login 伪静态 怎么写 localhost/cms//index/index/login

localhost/cms/admin.php?a=index&m=login 伪静态 怎么写 localhost/cms//admin/index/login

apache作为服务器访问的时候 .htaccess 文件


RewriteRule ^cms/index/index/login$ cms/index.php?a=index&m=login [QSA,PT,L]


RewriteRule ^cms/admin/index/login$ cms/admin.php?a=index&m=login [QSA,PT,L]


开启apahce中的

#LoadModule rewrite_module libexec/apache2/mod_rewrite.so
去掉#

RewriteRule ^cms/admin/(.*)/(.*)$ cms/admin.php?a=$1&m=$2 [QSA,PT,L]

RewriteRule ^cms/(.*)/(.*)/(.*)$ cms/$1.php?a=$2&m=$3 [QSA,PT,L]

abcd

a([a-z])([a-z])d


$0?? abcd? $1 = b $2 = c