0

これは非常に緊急です。htaccess ルールについてサポートが必要です。手がかりは、ユーザーが sth の回答を受け取ったとき、実際の URL は www.mydomain.com/results.html/sth になりますが、ブラウザでのみ www.mydomain.com/sth のみを表示する必要があり、私が彼をホームにリダイレクトするとページ (www.mydomain.com/index.html) URL は www.mydomain.com のみである必要があります。

ありがとう

4

3 に答える 3

0
#this is for the www.yourdomain.com/index.html
RewriteRule ^$  index.html  [L]
RewriteRule ^/$  index.html [L]

#this is for the results
RewriteRule ^([^/]+)$  results.html?$1
RewriteRule ^([^/]+)/$ results.html?$1
于 2012-11-11T10:29:06.760 に答える
0

コードの最初の 3 行を次のように置き換えます。

DirectoryIndex index.html

デフォルトで動作するはずだったのに

于 2012-11-11T10:44:54.153 に答える
0

これはうまくいくはずです:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/(results|index)\.html
RewriteCond %{REQUEST_URI} !^/?$
RewriteRule ^(.*)$ /results.html/$1

RewriteRule ^index\.html$ / [R=301,L]
于 2012-11-13T21:09:43.827 に答える