在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/PHP  Linux  Office/ 請(qǐng)教:phpstudy中php+nginx模式下,如何正確配置偽靜態(tài)?

請(qǐng)教:phpstudy中php+nginx模式下,如何正確配置偽靜態(tài)?

phpstudy中如果是在php+apache模式下,那么只需要在網(wǎng)站根目錄放.htaccess,其中配置偽靜態(tài)即可,
但是在php+nginx模式下,如何正確配置偽靜態(tài)呢?網(wǎng)站根目錄放.htaccess無(wú)效~
求教

需要配置的偽靜態(tài)如下(.htaccess中的)

RewriteRule ^down/index-details-([0-9]+)\.html down/index.php?act=down_details&id=$1
RewriteRule ^product/product-list-([0-9]+|)-([0-9]+|)\.html product/product-list.php?topclass=$1&category=$2
RewriteRule ^zerobuy/goods-list-([0-9]+|)-([0-9]+|)\.html zerobuy/goods-list.php?topclass=$1&category=$2
RewriteRule ^baike/index-show-([0-9]+)\.html baike/index.php?act=show&id=$1
RewriteRule company/index-([0-9]+)\.html company/index.php?uid=$1
RewriteRule ^product/product-show-([0-9]+)\.html product/product-show.php?id=$1
RewriteRule ^zerobuy/goods-show-([0-9]+)\.html zerobuy/goods-show.php?id=$1
RewriteRule ^zerobuy/goods-show-([0-9]+)-([0-9]+)\.html zerobuy/goods-show.php?id=$1&tid=$2
RewriteRule ^news/news-show-([0-9]+)\.html news/news-show.php?id=$1
RewriteRule ^news/news-list-([0-9]+)-([0-9]+)\.html news/news-list.php?id=$1&page=$2
RewriteRule ^news/news-list-([0-9]+)\.html news/news-list.php?id=$1
RewriteRule ^news/index.html news/index.php

求問(wèn)寫(xiě)在nginx中conf中的正確配置寫(xiě)法

回答
編輯回答
乖乖瀦

nginx不支持.htaccess文件,這個(gè).htaccess是針對(duì)apache的,你要想nginx 也支持rewrite,在nginxlocation中寫(xiě)你的rewrite規(guī)則

2017年8月3日 04:39