0

誰かが私のサイトにアクセスしたときに、次のように言うことができるようにする必要があります。

a) http://www.mysite.co.uk/

実際には次のコンテンツが表示されます。

b) http://www.mysite.co.uk/catalog/index.php

また、ユーザーが (b) を入力すると、(a) に 301 されます。

私の .htaccess には現在次のものがありますが、これにより 301 ループ エラーが発生します

RewriteRule ^/?$ catalog/index.php [L]
Redirect 301 /catalog/index.php http://www.mysite.co.uk

この問題を解決する方法はありますか? ありがとう

4

1 に答える 1

0

次の行に沿って何かを試してください。

#Permanently redirect BROWSER requests for the .php script to the Site root:
RewriteCond %{THE_REQUEST}      /catalog/index.php     [NC]
RewriteRule ^.*                 http://%{HTTP_HOST}/   [R=301,L]

#Internal redirect (Alias) the root of the site to: /catalog/index.php
RewriteRule ^$                  /catalog/index.php      [L]
于 2012-11-14T03:54:58.107 に答える