我已经为 Joomla 2.5 安装了 SH404SEF 组件。它在我的实时站点中工作,但在本地主机中不起作用。
我已启用 mod_rewrite 并在我的本地主机中添加了 htaccess。但它没有重定向并且发生 404 错误。请帮忙
我已经为 Joomla 2.5 安装了 SH404SEF 组件。它在我的实时站点中工作,但在本地主机中不起作用。
我已启用 mod_rewrite 并在我的本地主机中添加了 htaccess。但它没有重定向并且发生 404 错误。请帮忙
考虑更改变量 shDefaultParams['sh404SEF_USE_NON_STANDARD_PORT'。猜猜它会为你工作。
.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.