请注意,本文编写于 321 天前,最后修改于 314 天前,其中某些信息可能已经过时。
配置服务器的伪静态规则
Nginx配置
server {
listen 80;
server_name yourdomain.com;
root /home/yourdomain/www/;
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}
location ~ ..php(/.)*$ {
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
}
access_log logs/yourdomain.log combined;
}
Apache配置
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>
版权属于:Rileysion's Blog
本文链接:https://www.zyysvip.cn/69.html
转载时须注明出处及本声明
全部评论 (暂无评论)
info 还没有任何评论,你来说两句呐!