dslkchyv673627 2014-02-05 22:07
浏览 20
已采纳

htaccess重写不起作用

I have a htaccess file which should make pretty permalinks but when entering example.com/file/test/something it gets redirected to example.com/some/path/file.php?parameter=test&something=something

.htaccess

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
RewriteRule ^(.*)$ $1.php

Options +FollowSymLinks
RewriteRule file/(.*)/(.*)$ /some/path/file.php?parameter=$1&something=$2

Why does this get redirected?

NOTE: This only happens on my shared hosting server, on my localhost everything looks good.

  • 写回答

1条回答 默认 最新

  • doupinyan0186 2014-02-07 17:58
    关注

    The code works absolutely fine. It seemed to be a temporary error at my hosters site. After waiting a day it worked again.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?