【发布时间】:2014-04-30 03:55:59
【问题描述】:
我以某种方式破坏了我的 .htaccess。我承认 .htaccess 不是我通常搞砸的东西,但我想如果我遵循其他示例,我会管理它。
最初我试图将www.shadowlordscomics.com 重定向到子文件夹中的新drupal 站点。但是我在漫画的末尾省略了 s,这破坏了 url。但是,它没有将www.shadowlordscomics.com 重定向到损坏的url,而是重定向了一个使用相同空间的不同域officialshadowlords.com。
.htaccess 文件原本只有这个:
Options -Indexes
我用于重定向的内容是基于此:
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]
有没有办法恢复重定向?让它停止重定向到损坏的网址? Officialshadowlords.com 意味着要转到其子文件夹中的 index.html 文件。
【问题讨论】:
标签: php apache .htaccess redirect