我想添加Apache .htaccess规则。这是从旧服务器的nginx:Smarty .htaccess重写(来自nginx)
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location/{
if (-f $request_filename) {
break;
}
if (-d $request_filename) {
break;
}
rewrite ^/(.*) /index.php?demand=$1;
}
如何重写这个?我现在所得到的只是索引页,其余的文件都没有找到。我真的希望在这里得到一些帮助,谢谢。
我怎么能包括强制使用https? – mortusdetus
您是否看到过这个问题? http://stackoverflow.com/questions/4398951/force-ssl-https-using-htaccess-and-mod-rewrite – Yaroslav
@mortusdetus查看编辑 –