开发者

htaccess url shortening works locally not on server

I wonder if anyone can take a look at this htaccess and tell me why it should work on a localhost but not on server

Options +FollowSymlinks
RewriteEngine On
RewriteBase /subdirectory


RewriteCond %{RE开发者_StackOverflow社区QUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^news(.*)$ news.php?q=$1 [L,QSA]

RewriteRule ^view/([^/]+)/([^/]+).html /view.php?content_id=$1&content_id=$2 [NC]


Try to remove RewriteBase /subdirectory or rename it to RewriteBase /.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜