1

あるフォルダのすべてのファイルなしとディレクトリなしを別のフォルダにリダイレクトしたいと思います。.htaccessはルート(http://example.com)にある必要があります。

例:

http://example.com/admin/core/file.php - Does not exists. So, redirect (internally) to http://example.com/adminhide/core/file.php

http://example.com/admin/index.php - Exists. So, don't do anything..

コードを作成しようとしましたが、500内部サーバーエラーが発生しました:

Options +FollowSymLinks

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/admin/$
RewriteRule (.*)$ /adminhide/$1 [L]
4

0 に答える 0