征集讨论-求joomla 在IIS环境下url伪静态重写不带index.php的详细解决办法
IIS环境下joomla默认自带的sef路径带有index.php,点开出现404错误(原因暂时没找到)。
安装sh404sef组件还是无法解决,还是带index.php,点开还是出现404错误。
求joomla 在IIS环境下url伪静态重写的详细解决办法
万分感谢各位高手!!!
目前主机是win2008,服务器是IIS环境,速度一流,所以非必要不想换空间。因为喜欢joomla,不想换其他cms。
没有找到相关结果
已邀请:
3 个回复
3P网络 - 背着回忆的旅游人,即使是再细微的风景,也会留在心中的一个角落~
赞同来自:
需要IIS安装一个模块叫ISAPI
我以前尝试过,接近成功,不过好像对于后台的url造成影响导致后台操作有错误,所以也算不成功。
你现在也可以按官方说明试一下,成功了记得和大家分享
刘备曹操 - 古今多少事,都付谈笑中
赞同来自:
1:先开启自定义的URL静态化支持,详细问空间上客服。
2:在安装目录找到httpd.ini文件进行修改,全部内容替换如下:
[ISAPI_Rewrite]
# Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule /httpd(?:\.ini|\.parse\.errors) / [F,I,O]
# Block external access to the Helper ISAPI Extension
RewriteRule .*\.isrwhlp / [F,I,O]
#Rewrite Section Starts
#Fix MyBlog's SEF URLs - this prevents 404s on MyBlog links
RewriteRule ^/(.*)\.html /$1
#Keep Isapi_Rewrite from rewriting URLs that look like regular files
RewriteRule ^/(.*\.[a-zA-Z1-9]{2,4}) /$1 [L]
# Excluding the administrator section
RewriteRule ^/(administrator\/.*) /$1 [L]
#Get rid of the index.php
RewriteRule ^/(.*) /index.php\?/$1 [I,L]
3:修改index.php文件,在
require_once ( JPATH_BASE .DS.’includes’.DS.’defines.php’ );
require_once ( JPATH_BASE .DS.’includes’.DS.’framework.php’ );
后面加入以下代码;
if (isset($_SERVER))
{
$_SERVER = $_SERVER;
}
4:保存退出,在joomla后台管理中, 前台-全局设置-搜索引擎优化设置前两个选项选择是,
交流QQ:9526-76776 (joomla)
孤独者 - 世界属于那些勤于思考的人,更属于那些善于行动的人
赞同来自: