1
我需要将域的所有页面重定向到名为'emergency'的子页面。将所有页面重定向到子页面,但忽略特定页面
但是忽略两个特定的页面 - '紧急'页面本身和另一个页面'系统'。
我目前有:
AcceptPathInfo On
Options -Indexes
RewriteEngine On
RewriteBase/
RewriteCond %{REMOTE_ADDR} !^111\.111\.111\.111
RewriteCond %{REQUEST_URI} !^/(emergency|system)/?$ [NC]
RewriteRule^/emergency? [L,R=301]
RewriteCond $1 !^(index\.php|assets|robots\.txt|cgi-bin|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^/index.php
RewriteCond $1 !.(css|js|png|jpe?g|gif|ico)$ [NC]
RewriteRule ^(.*)$ /index.php?/$1 [L]
这并不不工作。
我已经看过,但无法得到任何工作之一:
- Apache redirect all sub pages to home page except specific pages
- .htaccess 301 redirect that excludes a subpage
任何帮助,将不胜感激!
谢谢!
我现在重定向到http:// WWW .domain.com/emergency?/ emergency –
好的,现在查看已编辑的答案 – anubhava
我现在将重定向到domain.com/emerge但我得到:“这个网页有一个重定向循环” –