0

私はwww以外のトラフィックをwwwにリダイレクトしていくつかのURLを書き換えるURL管理のための次の規則を持っています。それは私が "http://example.com/prosite/"(www、最初のリダイレクトの場合 - "^ $"なし)に行く以外は正常に動作するようです。私はこれがホームページ(それはhttp://www.example.com/prosite/index.php?page=homeにリダイレクトする必要があることを意味する)を持って来ると期待しますが、代わりに私を "http://www.example.com"にリダイレクトします。ご協力いただきありがとうございます。サブディレクトリ内のhtaccessはメインドメインにリダイレクトします

RewriteEngine On 

RewriteBase "/prosite/" 

# redirect non-www addresses to www 
# redirect condition: hostname does NOT contain 2 or more dots 
RewriteCond "%{HTTP_HOST}" "!\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])\." 
RewriteRule "^(.*)$" "http://www.%{HTTP_HOST}/prosite/$1" [R=301,L] 

# redirect empty path to home page 
RewriteRule "^$" "index.php?page=home" [NC,L] 

# redirect page path to corresponding page 
RewriteRule "^(home)/?$" "index.php?page=$1" [NC,L] 

# redirect all other paths to index.php (without a "page" argument this will show the default page: 404 not found) 
RewriteRule "!^index\.php$" "index.php" [NC,L] 

答えて

0

明らかにブラウザキャッシュの問題でした。私はキャッシュを空にし、それは働いた。

関連する問題