我的实际htaccess将我的完整旧站点重定向到我的新站点,我想重定向所有域,但除了两个文件.php(protectetfile1.php和protectedfile2.php).
这是我的htaccess
RewriteEngine On Rewritecond %{http_host} ^olddomain.org [NC] Rewriterule ^(.*)$http://newdomain.net/$1 [L,R=301]
使用此规则:
RewriteEngine On Rewritecond %{http_host} ^olddomain\.org [NC] RewriteCond %{REQUEST_URI} !/(protectetfile1|protectetfile2)\.php [NC] Rewriterule ^(.*)$http://newdomain.net/$1 [L,R=301]