.htaccess重定向尝试将错误的域重定向到错误的URL
I went and broke my .htaccess somehow. I admit that .htaccess is not something I usually mess around with, but I thought if I followed other examples, I'd manage it.
Originally I was trying to redirect www.shadowlordscomics.com to a new drupal site in a subfolder. But I left off the s at the end of comics, which broke the url. However, instead of redirecting www.shadowlordscomics.com to the broken url, it redirected a different domain that uses the same space, officialshadowlords.com.
The .htaccess file originally only had this inside of it:
Options -Indexes
What I used for my redirect was based off of this:
Options -Indexes
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} !^www\.mysite\.com$ [NC]
RewriteRule .* http://www.mysite.com/ [L,R=301]
RewriteRule ^$ drupal/index.php [L]
RewriteCond %{DOCUMENT_ROOT}/drupal%{REQUEST_URI} -f
RewriteRule .* drupal/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* drupal/index.php?q=$0 [QSA]
Is there a way to revert the redirect? To make it stop redirecting to the broken url? Officialshadowlords.com is meant to be going to an index.html file in its sub-folder.
我以某种方式破坏了我的.htaccess。 我承认.htaccess不是我经常乱用的东西,但我想如果我按照其他例子,我会管理它。 p>
最初我试图重定向 www.shadowlordscomics.com 到子文件夹中的新drupal站点。 但是我在漫画结束时离开了s,这打破了网址。 但是,它不是将 www.shadowlordscomics.com 重定向到已损坏的网址,而是重定向使用相同空间的其他网域。 , officialshadowlords.com 。 p>
.htaccess文件原本只有这个内部 : p>
选项-Indexes
code> pre>
我用于重定向的内容基于此: p >
选项-Indexes
RewriteEngine on
Options + FollowSymLinks
RewriteCond%{HTTP_HOST}!^ www \ .mysite \ .com $ [NC]
RewriteRule。* http:// www。 mysite.com/ [L,R = 301]
RewriteRule ^ $ drupal / index.php [L]
RewriteCond%{DOCUMENT_ROOT} / drupal%{REQUEST_URI} -f
RewriteRule。* drupal / $ 0 [L]
RewriteCond% {REQUEST_FILENAME}!-f
RewriteCond%{REQUEST_FILENAME}!-d
RewriteRule。* drupal / index.php?q = $ 0 [QSA]
code> pre>
有吗 一种恢复重定向的方法? 为了让它停止重定向到破碎的网址? Officialshadowlords.com em>旨在转到其子文件夹中的 index.html em>文件。 p>
div>
you can redirect to home page using errordocument
ERRORDOCUMENT 404 /