1.apache偽靜態配置
vim httpd.conf
#[plain] view plain copy
#加載模塊
LoadModule rewrite_module modules/mod_rewrite.so
#加載.htaccess
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
#設置為All,則讀取.htaccess內容
[plain] view plain copy
Options FollowSymLinks
AllowOverride All
2.apache偽靜態文件
# cat .htaccess RewriteEngine OnRewriteCond %{REQUEST_FILENAME} -s [OR]RewriteCond %{REQUEST_FILENAME} -l [OR]RewriteCond %{REQUEST_FILENAME} -dRewriteRule ^.*$ - [NC,L]RewriteRule ^.*$ index.php [NC,L]
3.配置nginx偽靜態
location / { if (!-f $request_filename){ rewrite ^/(.*)$ /index.php?s=$1 last; break; }}
本文出自 “深呼吸再出擊” 博客,請務必保留此出處http://ckl893.blog.51cto.com/8827818/1932583
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。