我为Joomla 2.5安装了SH404SEF组件。它在我的实时站点中工作,但在localhost中不起作用。
我启用了mod_rewrite并在我的localhost中添加了htaccess。但它没有重定向,发生404错误。请帮忙
答案 0 :(得分:0)
考虑更改变量shDefaultParams ['sh404SEF_USE_NON_STANDARD_PORT'。猜猜它会对你有用。
答案 1 :(得分:0)
.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.