【问题标题】:Subdomain with htaccess not working带有 htaccess 的子域不起作用
【发布时间】:2011-03-21 04:09:15
【问题描述】:

我刚刚为我的网站设置了一个子域。

我的问题是: 当我去http://xyz.site.com 时,我什么也没看到。只有“链接似乎已损坏”。 但是当我转到http://xyz.site.com/index.html 时,一切正常。

问题出在 .htaccess 中:

Options +FollowSymlinks
RewriteEngine on
RewriteBase /

RewriteRule ^([a-z0-9]+)/?$ profile.php?id=$1 [NC]

如果我评论 RewriteRule 它可以正常工作。

如何修复 htaccess?也许有一个 RewriteCond?

谢谢。

【问题讨论】:

    标签: .htaccess subdomain


    【解决方案1】:

    如果我是你,我会在 .htaccess 中设置一个默认页面。

    DirectoryIndex index.html

    【讨论】:

      猜你喜欢
      • 2018-08-07
      • 1970-01-01
      • 2013-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-19
      • 2015-07-12
      相关资源
      最近更新 更多