在Code_gniter的Fast-cgi环境中遇到mod_rewrite问题.我的.htaccess看起来像这样:
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\\.php|images|css|js|robots\\.txt|favicon\\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]
Run Code Online (Sandbox Code Playgroud)
但我得到一个错误'没有指定输入文件'.
我换了
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.* - [L]
RewriteCond $1 !^(index\.php|images|robots\.txt)
#RewriteRule ^(.*)$ /index.php?/$1 [QSA,L]
<IfModule mod_php5.c>
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_php5.c>
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
Run Code Online (Sandbox Code Playgroud)
它也适用于这个:
#RewriteRule ^(.*)$ /index.php?/$1 [QSA,L]
Run Code Online (Sandbox Code Playgroud)
我的问题是,如果我从$ config ['index_page'] ='index.php'更改配置文件application/config/config.php,我仍然在URL上有index.php; to $ config ['index_page'] =''; 我有一个不同的错误.
我做错了什么?
我们将 Windows 服务器从 Framework v2 升级到 v4,从 iis 6 升级到 iis 8.5。有些网站仍然使用相同的框架 v2,但其中一个网站出现这种错误:
HTTP 错误 500.21 - 内部服务器 ErrorHandler“handlers/exchange.axd_ ”在其模块列表中有一个错误的模块“ManagedPipelineHandler”*
这是在旧服务器上运行的。现在我们有Windows 2012 R2
在 web.config 中:
如果我运行这个 %windir%\Microsoft.NET\Framework\v4.0.21006\aspnet_regiis.exe -i 我担心会更改其他站点的框架。
有没有办法在 Web.config 或 IIS 中指定框架?如何解决这个500错误?有任何想法吗 ?
我们将此站点的框架从 .NET CLR V.2.05.xxxxx Classic 更改为 .Net CLR v4.0.21006 Integrated on IIS。
我想 preCondition=IntegratedMode 也有效,我没有测试。
谢谢