如何在MacOSX中设置重写规则codeigniter.htaccess
我想设置nginx.conf和.htaccess(codeigniter)我曾尝试在nginx.conf中设置rewrite,但没有成功 这是我的nginx.conf如何在MacOSX中设置重写规则codeigniter.htaccess,macos,codeigniter,mod-rewrite,nginx,Macos,Codeigniter,Mod Rewrite,Nginx,我想设置nginx.conf和.htaccess(codeigniter)我曾尝试在nginx.conf中设置rewrite,但没有成功 这是我的nginx.conf worker_processes 4; events { worker_connections 1024; } http { sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; serv
worker_processes 4;
events {
worker_connections 1024;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
include mime.types;
default_type text/plain;
log_format gzip '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" "$gzip_ratio"';
access_log /usr/local/logs/nginx/access.log gzip buffer=32k;
error_log /usr/local/logs/nginx/error.log notice;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
server {
listen 80;
server_name localhost;
root /usr/local/var/www;
index index.php index.html;
location ~ \.php$ {
fastcgi_pass unix:/tmp/php-fpm.sock;
}
include fastcgi_params;
}
include /usr/local/etc/nginx/conf.d/*;
include /usr/local/etc/nginx/sites-enabled/*;
}
在这种情况下,我的.htaccess文件为空,
谁能帮帮我
thxnginx不支持htaccess,因为我知道你需要将重写规则放在nginx的conf中&它有自己的语法。@ahmad:你可以给我一个nginx.conf的例子来说明重写规则吗?我不知道它是如何工作的,但这里有一个网站可以将htaccess规则转换为nginx规则:thx ahmad,我的问题终于解决了,nginx codeigniter无法设置.htaccess,但只能在nginx.conf上设置