- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我有 Joomla 1.5.9 运行 php 5.2.8,mySQL 5.1.31 在 IIS7 上的 vista 64 开发框。我的 SEO 设置“搜索引擎友好 URL”和“使用 Apache mod_rewrite”都正常工作。
我也在建立一个托管站点(使用 www.mochahosting.com)。他们使用相同软件的稍旧版本:Joomla 1.5.5、php 5.2.6、mySQL 5.0.4x。他们也使用 IIS7,但在 Windows 32 上运行。
我无法在托管站点 上使用 的任何 SEO 设置(我已将 SEO 设置用于我的本地机器,配置几乎相同)。让我们从“搜索引擎友好的 URL”开始,只是为了让事情变得简单。
另外,我还没有域名,所以我使用主机文件别名来访问该站点。我不指望有人会遇到这样的麻烦来回答我的问题,所以我只会描述这个问题,并希望我做得足够好,让人们能够理解正在发生的事情。出于此问题的目的,我将使用 http://nodomainyet.com/joomla156_mx 作为基本 URL(即 joomla 主页)。是的,这确实意味着 Joomla 安装在一个子目录中——我不确定这是否有问题(这不是我的开发箱上的问题)。
到问题。
打开“搜索引擎友好 URL”会导致 http://nodomainyet.com/joomla156_mx 生成 404(“找不到组件”)。在 404 错误页面中,有一个指向 http://nodomainyet.com/joomla156_mx/index.php 的链接——该链接有效。如果我关闭“搜索引擎友好 URL”,那么 http://nodomainyet.com/joomla156_mx 和 http://nodomainyet.com/joomla156_mx/index.php 都可以工作。因此,似乎打开“搜索引擎友好的 URL”会导致 http://nodomainyet.com/joomla156_mx 的“自动重定向”到 http://nodomainyet.com/joomla156_mx/index.php 停止工作......
现在,如果我转到 http://nodomainyet.com/joomla156_mx/index.php 并从那里导航到各种主菜单链接(我只使用安装了新 Joomla 实例的默认 joomla 站点),那么一切正常。它只是去 http://nodomainyet.com/joomla156_mx 不起作用。值得注意的是,主菜单中的“主页”链接默认转到 http://nodomainyet.com/joomla156_mx。
我已经将主机上 phpinfo 的输出与我的开发箱的输出进行了比较,但看不到任何会导致此问题的差异...
打开第二个 SEO 设置——“使用 Apache mod_rewrite”——并没有解决问题(有人会认为它可以,因为该设置的目的是摆脱 URL 中的 index.php)。
“搜索引擎友好的 URL”通常看起来很容易开始工作——它不需要 web.config 和重写规则......我不确定是什么可能导致它出错。
更新 - 2009-03-03
我认为仅从 ("Use Apache mod_rewrite") 打开第一个 SEO 设置("搜索引擎友好的 URL")可能是一个坏主意(即使我可以在我的计算机上单独打开"搜索引擎友好的 URL")本地机器,它工作正常)。所以我尝试了更多的实验
我认为问题可能在于主机上的 IIS7 中未正确设置 URL 重写。我做了在 http://learn.iis.net/page.aspx/461/creating-rewrite-rules-for-the-url-rewrite-module 中描述的(第一个)测试文件并且它起作用了——所以这意味着 URL 重写正在起作用。
然后我想也许问题在于,在IIS7上到处看到的Joomla的重写规则需要重写以考虑子目录。就像我上面说的,SEO 设置在我的本地机器上运行良好。 Joomla 也安装在一个子目录中,一切正常。尽管如此,我还是尝试修改重写规则
<rewrite>
<rules>
<rule name="Imported Rule 1" enabled="true">
<match url="(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" />
<add input="{SCRIPT_NAME}" negate="true" pattern="^/index.php" ignoreCase="false" />
<add input="{SCRIPT_NAME}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
<rewrite>
<rules>
<rule name="Imported Rule 1" enabled="true">
<match url="(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" />
<add input="{SCRIPT_NAME}" negate="true" pattern="^/joomla156mx/index.php" ignoreCase="false" />
<add input="{SCRIPT_NAME}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" />
</conditions>
<action type="Rewrite" url="joomla156mx/index.php" />
</rule>
</rules>
</rewrite>
最佳答案
此页面上的最后一步遍历 Enabling Search Engine Friendly URLs 。
By default Joomla uses query string parameters for all the links URLs it generates for your web site. This behavior can be changed by enabling what is called "Search Engine Friendly URLs" in Joomla. However, this feature relies on the URL rewriting functionality to be available on the web server. IIS 6.0 does not have URL rewriting capabilities, so you could use one of the third party URL rewriting products, such as ISAPI_Rewrite or Ionics ISAPI Rewrite Filter. IIS 7.0 has URL rewriting support, which can be enabled by installing Microsoft URL Rewrite Module for IIS 7.0. The following instructions describe how URL Rewrite Module for IIS 7.0 can be used to enable Clean URLs in Joomla.
First, you will need to download and install Microsoft URL Rewrite Module. Once it has been installed, create and open a web.config file located in C:\inetpub\wwwroot\Joomla folder. Paste the following XML code into this file.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Security Rule" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAny">
<add input="{QUERY_STRING}" pattern="mosConfig_[a-zA-Z_]{1,21}(=|\%3D)" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="base64_encode.*\(.*\)" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="(\<|%3C).*script.*(\>|%3E)" />
<add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
</conditions>
<action type="CustomResponse" url="index.php" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="SEO Rule">
<match url="(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" />
<add input="{URL}" negate="true" pattern="^/index.php" ignoreCase="false" />
<add input="{URL}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
关于iis - IIS7 上的 Joomla 搜索引擎友好 URL 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/599184/
当我查看 IIS 日志文件时,我可以在一天中的不同时间看到标题行被写入日志文件。我唯一一次看到这种情况发生是在 IIS 重置时;或启动。 例如下面的标题行; #Software: Microsoft
有谁知道为什么以下 web.conig 更改不起作用: 在我添加 javascript 文件后仍然没有被压缩(gzip)。我折腾了几天,因为一开始我真的不知道问题是
目前,我们所有的网络应用程序都将其应用程序池标识设置为 ApplicationPoolIdentity。现在,当一个应用程序需要访问某些服务器上的某些资源时,比如添加/读取某些文件,该应用程序会在代码
在 IIS(特别是 6.0)中,在“主目录”选项卡下,如果我更改本地路径,是否会导致 IIS 重新启动或应用程序池回收? 相关的,是否有概述 IIS 元数据库的哪些更改将触发重新启动或应用程序池回收的
只要更改了任何 web.config 文件,AFAIK IIS 就会重新启动。 我创建了自己的配置文件(my.config,层次结构略有不同)。是否有可能让 IIS 自动(自动神奇地 :))重新启动,
你好, 我正在寻找 IIS 日志中列出的浏览器条目列表,以帮助识别访问我们网站的不同版本的浏览器。也许没有一个列表,而是一个应该用来识别不同浏览器及其版本的算法。 请注意,我不是在寻找日志分析器,而是
我想知道上次重新启动 iis 是什么时候。 IIS 是否保留了此日志,我在哪里可以找到此日志? 谢谢 最佳答案 打开事件查看器,导航到“Windows 日志”->“系统” 在右侧的“操作” Pane
在全新安装的带有 IIS 7 的 Windows Server 2008 R2 上,它会在 C:\inetpub\wwwroot 中创建一个默认网站。 .我确信对于存储网站文件的好位置有很多主观意见,
我已按照 this question 中的说明在 IIS 中实现动态内容压缩。 . 当我发送请求时,我看不到响应被 gzip 压缩的任何证据: IIS版本为7.5 有什么明显的我应该检查以解决此问题吗
这是场景: 服务器 A 托管“主”应用程序 (www.example.com) 服务器 B 托管支持应用程序 (b.example.com) 它们通过 192.* 地址在内部相互连接,并且都可以通过
是否有任何替代 IIS 管理 UI 可用于从程序重置 IIS?.. 现在我们已经创建了一个批处理文件,如果 iis 重置并每小时安排一次...... 我只是想要一些东西,这样我们就不能重置 iis..
我的 Windows Server 在 IIS 7.5 上运行 Web 应用程序。 我想知道为什么 IIS 应用程序池使用大量内存。 请参阅我从服务器捕获的屏幕截图。 在名为 TEST 2.0(.NE
我在 IIS 7.5 上运行的 ASP Classic 站点上收到服务器错误。 我将“向浏览器发送错误”设置为 True ,但是我仍然收到以下错误屏幕: 最佳答案 IIS 正在劫持您的经典 ASP 应
我正在尝试通过IIS上的反向代理连接到websockets服务器(websockify)。 IIS和Websockets服务器位于同一台物理服务器上(Windows Server 2012 R2,II
我需要让我的开发机器从本地机器商店读取证书 为此,我需要运行winhttpcertcfg.exe并指定我要提升的帐户 该帐户用于IIS表示什么? (对于IIS,它将是IWAM_MachineName)
我正在阅读特定命令(SET-WEBCONFIGURATIONPROPERTY),但出现"is not recognized as a cmdlet"错误。给我的建议是,即使我使用的是SharePoin
我已经为 IIS8 安装了静态和动态压缩并启用了它。 当我的CPU性能100%时,我的GZIP IIS不工作,为什么? 我可以清楚地看到 GZIP 没有在 Live HTTP header 中运行。我
我已经从官方镜像(https://hub.docker.com/r/microsoft/iis/)运行了IIS 在Windows Server 2016上 有什么方法可以从IIS管理器连接到该IIS,
你好, 如果 iis 未运行,我想编写一个状态为的代码。 最佳答案 从命令行启动 IIS: iisreset /start 从命令行停止 IIS: iisreset /stop 重新启动(停止和启动)
我已经为 IIS8 安装了静态和动态压缩并启用了它。 当我的CPU性能100%时,我的GZIP IIS不工作,为什么? 我可以清楚地看到 GZIP 没有在 Live HTTP header 中运行。我
我是一名优秀的程序员,十分优秀!