2014-04-30 03:55
浏览 33


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 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 to the broken url, it redirected a different domain that uses the same space,

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 .*   [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? is meant to be going to an index.html file in its sub-folder.

图片转代码服务由CSDN问答提供 功能建议

我以某种方式破坏了我的.htaccess。 我承认.htaccess不是我经常乱用的东西,但我想如果我按照其他例子,我会管理它。

最初我试图重定向 到子文件夹中的新drupal站点。 但是我在漫画结束时离开了s,这打破了网址。 但是,它不是将 重定向到已损坏的网址,而是重定向使用相同空间的其他网域。 ,

.htaccess文件原本只有这个内部 :



RewriteEngine on 
Options + FollowSymLinks 
RewriteCond%{HTTP_HOST}!^ www \ .mysite \ .com $ [NC] 
RewriteRule。* http:// www。 [L,R = 301] 
RewriteRule ^ $ drupal / index.php [L] 
RewriteCond%{DOCUMENT_ROOT} / drupal%{REQUEST_URI} -f 
RewriteRule。* drupal / $ 0 [L] 
RewriteCond%  {REQUEST_FILENAME}!-f 
RewriteRule。* drupal / index.php?q = $ 0 [QSA] 

有吗 一种恢复重定向的方法? 为了让它停止重定向到破碎的网址? 旨在转到其子文件夹中的 index.html 文件。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dqkgxq0561 2014-04-30 04:05

    you can redirect to home page using errordocument

    解决 无用
    打赏 举报

相关推荐 更多相似问题