sh404sef无法在localhost中工作

时间:2012-12-04 06:21:40

标签: url-rewriting joomla2.5

我为Joomla 2.5安装了SH404SEF组件。它在我的实时站点中工作,但在localhost中不起作用。

我启用了mod_rewrite并在我的localhost中添加了htaccess。但它没有重定向,发生404错误。请帮忙 enter image description here

2 个答案:

答案 0 :(得分:0)

考虑更改变量shDefaultParams ['sh404SEF_USE_NON_STANDARD_PORT'。猜猜它会对你有用。

答案 1 :(得分:0)

  • 创建Joomla
  • 的全新安装
  • 之后检查是否有.htacsess文件,
  • 否则创建.htaccess文件,最后
  • 使用Sh404sef的控制面板
  • 安装Sh404sef组件
  • 启动SEF流程,您可以查看结果

.htaccess示例

在.htaccess文件的末尾,您会看到

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.