.htaccess 重定向特定页面,然后重定向所有其他页面
从哪里开始 我需要移动一个网站到一个新的子域与约20个特定的网页,然后只是空白重定向一切.htaccess 重定向特定页面,然后重定向所有其他页面,.htaccess,.htaccess,从哪里开始 我需要移动一个网站到一个新的子域与约20个特定的网页,然后只是空白重定向一切 有什么想法吗?您希望在.htaccess文件中有类似的内容: Options +FollowSymlinks -MultiViews RewriteEngine on # Redirect specific pages RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC] RewriteRule ^(index\.html)$ http://newdomain.co
有什么想法吗?您希望在
.htaccess
文件中有类似的内容:
Options +FollowSymlinks -MultiViews
RewriteEngine on
# Redirect specific pages
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC]
RewriteRule ^(index\.html)$ http://newdomain.com/path/$1 [R=301,L,NC]
RewriteRule ^(index2\.html)$ http://newdomain.com/path/$1 [R=301,L,NC]
RewriteRule ^(index3\.html)$ http://newdomain.com/path/$1 [R=301,L,NC]
# Redirect all others to the new domain
RewriteRule ^(.*)$ http://newdomain.com/ [R=301,L]
使用以下工具针对您的情况进行定制和测试: