【问题标题】:How to use .htaccess file on windows server如何在 Windows 服务器上使用 .htaccess 文件
【发布时间】:2014-07-11 15:27:20
【问题描述】:

我使用 GoDaddy 产品。我有一个主机,上周我将 linux 更改为 windows server。 更改托管类型后,不幸的是 404 重定向不起作用..

我有这样的 .htaccess 文件:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http//www.%{HTTP_HOST}/$1 [R=301,L]

Options +FollowSymlinks
RewriteEngine On
RewriteBase /

RewriteRule ^(.*).html$                                       viewcontent.php?id=$1                            [NS]
RewriteRule ^(.*).htm$                                        haberler.php?id=$1                               [NS]
RewriteRule sitemap.xml                                       xml.php                                          [NS]

如何在 Windows 主机上使用此链接.. 我必须做什么?

顺便说一句,我认为 GoDaddy Windows 托管不支持 apache。所以我不能使用 .htaccess

感谢您的帮助。

【问题讨论】:

  • Windows Server 无疑会使用 IIS。您从 Linux 服务器切换到 Windows 是否有原因?
  • Godaddy windows使用iis服务器,所以需要web.config文件。试试这个:htaccesstowebconfig.com 或者改回 linux!!

标签: php apache .htaccess


【解决方案1】:
猜你喜欢
  • 1970-01-01
  • 2013-01-07
  • 1970-01-01
  • 1970-01-01
  • 2016-09-24
  • 2010-11-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多