window nginx codeigniter rewrite
apache下只用。htaccess
RewriteEngine on RewriteCond $1 !^(index\.php|css|themes|images|robots\.txt) RewriteRule ^(.*)$ index.php/$1 [L]
nginx不支持rewriteCond,nginx配置方法:
server { listen 80; server_name act; location / { root D:/ci_act; index index.html index.htm index.php; autoindex on; rewrite ^/$ /index.php last; rewrite ^/(?!index\.php|css|themes|images|robots\.txt)(.*)$ /index.php/$1 last; } location ~ ^(.+\.php)(.*)$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED D:/ci_act$fastcgi_path_info; fastcgi_param SCRIPT_FILENAME D:/ci_act$fastcgi_script_name; include fastcgi_params; } }
相关推荐
zyyjay 2020-11-09
xuebingnan 2020-11-05
samtrue 2020-11-22
stefan0 2020-11-22
yifangs 2020-10-13
songshijiazuaa 2020-09-24
hebiwtc 2020-09-18
天步 2020-09-17
83911535 2020-11-13
whatsyourname 2020-11-13
zhouyuqi 2020-11-10
Noneyes 2020-11-10
mathchao 2020-10-28
王志龙 2020-10-28
wwwsurfphpseocom 2020-10-28
diskingchuan 2020-10-23
savorTheFlavor 2020-10-23