Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这样的域:
someword.com.s123234.gridserver.com
我正在尝试 .htaccess 重定向
RewriteEngine on RewriteCond %{HTTP_HOST} !^someword.com.s123234.gridserver.com/$ RewriteRule ^/(.*)$ http://www.someword.com/$1 [R=301,L]
但重定向不起作用。
如何永久重定向此类域?
谢谢
由于该点对 htaccess 意味着某些东西(即“所有字符),因此您必须写 . 代替。
RewriteEngine on RewriteCond %{HTTP_HOST} !^someword\.com\.s123234\.gridserver\.com$ RewriteRule ^/(.*)$ http://www.someword.com/$1 [R=301,L]