我在子目录 www.mysite.com/shop/ 下运行 Lemonstand
这是我的柠檬摊位置规则:
# Lemonstand
location /shop {
root /home/sites/mysite.com/public_html/shop/;
index index.php;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_param SCRIPT_NAME index.php;
fastcgi_param QUERY_STRING url=$uri&$args;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_buffer_size 32k;
fastcgi_buffers 4 32k;
fastcgi_busy_buffers_size 64k;
}
我可以访问 mysite.com/shop 上的页面。
商店的所有 URL应该是这样的:
mysite.com/shop/category/freight
mysite.com/shop/products/dog-toy
实际上在页面上时,它们的结构如下:
mysite.com/category/freight
mysite.com/products/dog-toy
奇怪的是,即使我将正确的 URL 粘贴到浏览器,它也只会显示我的基本 /shop/ 页面,就好像其他页面不存在一样。任何人都可以帮忙吗?