在我的根的.htaccess我有適用於所有htaccess的重寫,不打算
Options +FollowSymlinks
Options -Indexes
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/dashboard/
RewriteCond %{HTTPS} =on
RewriteCond %{HTTP_HOST} ^dashboard.domain.com
RewriteRule ^(.*)$ /dashboard/$1 [NC,L,NS]
在儀表盤的文件夾的.htaccess我..
RewriteRule ^go/([^/.]+)/?$ index.php?flag=$1 [L]
當我去dashboard.domain。 COM /登錄它拋出了一個錯誤。 當我轉到dashboard.domain.com/go/a時,它可以正常工作。
當我#儀表板重寫規則發生相反的情況時,/登錄工程,但然後/去/ $ 1沒有。我錯過了/ go重寫只適用於檢測到/ go的時候?
EDIT(根htaccess的其餘部分)的儀表板下面的規則
AddHandler application/x-httpd-php54 .php
Options +FollowSymlinks
Options -Indexes
RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteCond %{REQUEST_URI} !^/rocket/
RewriteCond %{HTTPS} =on
RewriteCond %{HTTP_HOST} ^launch.domain.com
RewriteRule ^(.*)$ /rocket/$1 [NC,L,NS]
RewriteCond %{REQUEST_URI} !^/dashboard/
RewriteCond %{HTTPS} =on
RewriteCond %{HTTP_HOST} ^dashboard.domain.com
RewriteRule ^(.*)$ /dashboard/$1 [NC,L,NS]
RewriteCond %{REQUEST_URI} !^/img/
RewriteCond %{HTTPS} =on
RewriteCond %{HTTP_HOST} ^img.domain.com
RewriteRule ^(.*)$ /img/$1 [NC,L,NS]
#RewriteCond %{HTTPS} off
#RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com [NC]
#RewriteCond %{HTTP_HOST} !launch.domain.com [NC]
#RewriteRule ^(.*)$ https://launch.domain.com/$1 [R=301,L,QSA]
Redirect 301 /sneakpeek/
RewriteRule ^error/([^/]+) error/failure.php?code=$1
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
<FilesMatch "\.(ttf|otf|eot|woff|jpg|png|jpeg|gif|js|json|html|css|php)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
ErrorDocument 400 /error/400
ErrorDocument 401 /error/401
ErrorDocument 403 /error/403
ErrorDocument 404 /error/404
ErrorDocument 500 /error/500
@anubhava「所請求的URL /儀表板/登陸此服務器上找到。此外,遇到一個404 Not Found錯誤,而試圖用一個ErrorDocument來處理請求。「 我將編輯帖子以包含其餘內容。 –