简体   繁体   English

将Magento网址重写为Wordpress页面

[英]Rewrite Magento url to Wordpress page

I have a Magento site installed at the root of my domain and a Wordpress installed in a subdirectory. 我在域的根目录中安装了一个Magento网站,在子目录中安装了Wordpress。 Currently I access my sites like this: 目前,我这样访问我的网站:

  • Magento: "domain.com" Magento:“ domain.com”
  • Wordpress: "domain.com/blog" WordPress:“ domain.com/blog”

I would like to be able to use Wordpress Pages seamlessly, without the "/blog" subdirectory showing in the url, such as: 我希望能够无缝使用Wordpress Pages ,而不会在URL中显示“ / blog”子目录,例如:

Wordpress Page-X: "domain.com/page-x" Wordpress Page-X:“ domain.com/page-x”

Note that I do want to keep the "/blog" subdirectory showing normally for blog posts etc... I just don't want it for Wordpress Pages. 请注意, 我确实希望在博客文章等中保持“ / blog”子目录正常显示 ...我只是不想在Wordpress Pages上显示。

Could anybody help on how to set that up? 有人可以帮忙设置吗? I was think tweaking the .htaccess would've work, but I can't find out how. 我当时认为对.htaccess进行调整是可行的,但我不知道如何进行。 Other solutions are welcome too. 也欢迎其他解决方案。 Thank you. 谢谢。

Magento provides you with an option to create custom URL rewrites in the backend (admin) you can find it here. Magento为您提供了在后端(admin)中创建自定义URL重写的选项,您可以此处找到它。 This way you should be able to create rewrites. 这样,您应该能够创建重写。 Also if you want to automate the creation of rewrites you can refer to the core_rewrites table in magento's database. 同样,如果您想自动创建重写,则可以参考magento数据库中的core_rewrites表。 Also this is a good read if you want to do logic based rewrites on the fly. 如果您想即时进行基于逻辑的重写, 也是一本好书。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM