时间:2021-07-01 10:21:17 帮助过:12人阅读
Apache url_rewrite:
LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngineonRewriteBase /
RewriteCond%{REQUEST_FILENAME} !-d
RewriteCond%{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]#RewriteRule ^(.*)$ index.php?$1 [QSA,L]
Nginx url_rewrite:
location / {
if (!-e $request_filename) {
#一级目录
rewrite ^/(.*)$ /index.php/$1 last;
#二级目录
rewrite ^/public/(.*)$ /public/index.php/$1 last;
}
}
').addClass('pre-numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i <= lines; i++) {
$numbering.append($('').text(i));
};
$numbering.fadeIn(1700);
});
});
以上就介绍了 Apache & nginx 的地址重写 url_rewrite,省略 indexphp,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。