首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Joomla3返回404,首页除外

Joomla3返回404,首页除外
EN

Stack Overflow用户
提问于 2013-11-08 04:49:32
回答 1查看 104关注 0票数 0

将一个站点迁移到一个开发服务器,并且我得到了奇怪的行为。原始包装盒上没有问题。我做了一个手动移动,即scp的文件转移到新的机器上,mysqldump的数据库在旧的机器和恢复数据库在新的机器和编辑的configuration.php文件指向新的设置在开发机器上

我可以访问主页,一切正常,但对于所有菜单,我得到一个404错误。配置文件显示打开并设置了url重写。

代码语言:javascript
复制
public $sef = '1';
public $sef_rewrite = '1';

更奇怪的是,如果我关闭了sef,大多数东西都可以工作,但不是全部。例如,我可以调用http://my.test.site/index.php?option=com_content&view=category&layout=blog&id=41&Itemid=116,在Apache访问日志中,我会得到一个200响应代码,但在浏览器中却是一个空白页面。

我尝试打开和关闭设置和重写设置,清除缓存,并在.htaccess文件中切换RewriteBase / on和off,但都没有效果。

有谁有想法吗?

Dev Box - Apache 2.4.2,PHP 5.5.3和Joomla!3.1.5稳定Ember

通过apachectl -t -D DUMP_MODULES加载Apache模块

代码语言:javascript
复制
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 cgid_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 geoip_module (shared)
 headers_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 socache_shmcb_module (shared)
 ssl_module (shared)
 status_module (shared)
 unique_id_module (shared)
 php5_module (shared)

编辑-我也查看了我的php和joomla日志,什么也没有出现。

更新-取得了一些进展。非sef URL都正常工作。最后追踪到一个缺失的模块(图像)。然而,在sef URL上仍然没有进展。所有其他页面上的所有404

EN

回答 1

Stack Overflow用户

发布于 2013-11-08 07:27:50

在浏览了一堆论坛和电子邮件之后,我想到的是.htaccess文件。我经历了许多排列,但似乎没有任何帮助。

无意中,我检查了一下mod_rewrite是否已加载并正常运行。我很确定它是加载的,但它不工作。我做了一个测试,但无法让它重写我的URL

例如,我将此代码添加到.htaccess文件中

代码语言:javascript
复制
Options +FollowSymLinks
Redirect /cnn.html http://www.cnn.com

我发现在Apache conf文件中,默认安装是AllowOverride None,而它应该是AllowOverride All。一旦我进行了更改并重新启动,就可以继续运行了

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19846409

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档