私はVServerを持っており、/ var / www /にいくつかのadmin-appsがあり、/ var / customers / webs /web001/に他の一般的なものがあります。
既存ではないすべてのファイルとディレクトリをリダイレクトしたい
/var/www/ -> /var/customers/webs/web001/
ルートとweb001の顧客にドメイン名を使用できるようにします。
これを達成するための最良の方法はわかりません。mod_rewriteを試してみましたが、再帰の制限に達する内部リダイレクトがあります。
私は何を間違っていますか?
.htaccess
# allow psydo-location (not existing folder)
Options +FollowSymLinks
# Turn on URL rewriting engine
RewriteEngine On
# Folder of this htaccess-file in not root-folder
RewriteBase /var/www/
# Disable rewriting for existing files or directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^/var/customers/webs/web001/
# redirect all other requests to index.php
rewriteRule ^.*$ /var/customers/webs/web001/index.php [DPI,L]
apache2 / error.log
Request exceeded the limit of 10 internal redirects
due to probable configuration error.
Use 'LimitInternalRecursion' to increase the limit if necessary.
Use 'LogLevel debug' to get a backtrace.
redirected from r->uri = /var/customers/webs/web001/index.php
redirected from r->uri = /var/customers/webs/web001/index.php
redirected from r->uri = /var/customers/webs/web001/index.php
redirected from r->uri = /var/customers/webs/web001/index.php
redirected from r->uri = /var/customers/webs/web001/index.php
redirected from r->uri = /var/customers/webs/web001/index.php
redirected from r->uri = /var/customers/webs/web001/index.php
redirected from r->uri = /var/customers/webs/web001/index.php
redirected from r->uri = /var/customers/webs/web001/index.php
redirected from r->uri = /index.php
rewrite.log
(3) [perdir /var/www/] strip per-dir prefix: /var/www/index.php -> index.php
(3) [perdir /var/www/] applying pattern '^.*$' to uri 'index.php'
(4) [perdir /var/www/] RewriteCond: input='/var/www/index.php' pattern='!-f' => matched
(4) [perdir /var/www/] RewriteCond: input='/var/www/index.php' pattern='!-d' => matched
(4) [perdir /var/www/] RewriteCond: input='/var/www/index.php' pattern='!^/var/customers/webs/web001/' => matched
(2) [perdir /var/www/] rewrite 'index.php' -> '/var/customers/webs/web001/index.php'
(2) [perdir /var/www/] trying to replace prefix /var/www/ with /var/www/
(1) [perdir /var/www/] internal redirect with /var/customers/webs/web001/index.php [INTERNAL REDIRECT]
(3) [perdir /var/www/] add path info postfix: /var/www/var -> /var/www/var/customers/webs/web001/index.php