【问题标题】:Magento site launch to live server display only home pageMagento 站点启动到实时服务器仅显示主页
【发布时间】:2016-05-16 04:26:12
【问题描述】:

我们目前托管在 bluehost 上。

我们的旧网站位于 public_html 的根文件夹中。我们开发了一个新的并将它放在一个名为原型的子目录文件夹中。原型现已完成,我们希望我们的主域重定向新的开发网站。

注意:它们都在实时服务器上,我们使用插件域来 访问原型。

我们已经更新了我们的 .htaccess 文件

# BlueHost.com 
# .htaccess main domain to subdirectory redirect 
# Do not change this line. 
RewriteEngine on 
# Change example.com to be your main domain. 
RewriteCond %{HTTP_HOST} ^(www.)?ourdomain.com$ 
# Change 'subdirectory' to be the directory you will use for your main domain. 
RewriteCond %{REQUEST_URI} !^/prototype/ 
# Don't change the following two lines. 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
# Change 'subdirectory' to be the directory you will use for your main domain. 
RewriteRule ^(.*)$ /prototype/$1 
# Change example.com to be your main domain again. 
# Change 'subdirectory' to be the directory you will use for your main domain 
# followed by / then the main file for your site, index.php, index.html, etc. 
RewriteCond %{HTTP_HOST} ^(www.)?ourdomain.com$ 
RewriteRule ^(/)?$ prototype/index.php [L]

我们还更新了网址的安全和不安全,包括其他网址。我们 还清除日志、缓存和会话。

问题是主页正在运行,但是当我们尝试在其他页面上导航时,即使网址正确,它也会显示 网站的主页。有些页面有正确的网址,但对于其他喜欢我们和联系我们的人,网址来自旧网站。这有点奇怪,而不是显示旧网站主页显示的 404 页面。

我们甚至无法访问 magento 管理员。

我不知道如何解决这个问题。

这与我们的托管服务提供商有关吗?

我们需要重启服务器吗?

【问题讨论】:

  • 您是否删除了缓存文件夹?先把它删了试试看可能对你有帮助。
  • 其他页面有 404 吗?
  • @Dinesh Bhojvani 是的,我删除了缓存文件夹。
  • @Sunny Rathod 有点奇怪,但不是 404,而是显示旧网站。
  • 请清除缓存和浏览器缓存,确保在您的服务器中未安装 mam 缓存清漆或任何其他相关内容。

标签: javascript php .htaccess magento


【解决方案1】:

我认为你的 magento 安装在子文件夹中。你需要更新表 带有

的 core_config_data 表

web/unsecure/base_url =>  http://your-domain/prototype/ 
web/secure/base_url =>  http://your-domain/prototype/ 

按照以下步骤进行。

  1. 清除缓存。

  2. 做索引

我希望它对你有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-11-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-14
    • 2017-04-02
    • 1970-01-01
    • 2016-06-19
    相关资源
    最近更新 更多