让 Wordpress 在基础层面与 Zend Framework 相一致

发布于 2024-08-21 22:48:28 字数 579 浏览 2 评论 0原文

我当前有一个 WordPress 博客,其博客文章 URL 结构为 http://somedomain.com/2010/02 /postname

我现在正在基础级别安装 zend 框架实现 http://somedomain.com/

我不希望我的博客有不同的 url 结构。就像http://somedomain.com/blog/2010/02/article-name

关于如何最好地保留旧的 url 结构并仍然让 zend 框架存在于 / 的任何想法

我的想法是将博客移动到 /blog 并在那里进行 url 重写以使所有内容看起来好像它位于 / ,但是我不认为这行得通吗?

I have a current wordpress blog with the blog posts URLs structured as http://somedomain.com/2010/02/postname

I'm now installing a zend framework implementation at the base level http://somedomain.com/

I DON'T want my blog to have a different url structure. like http://somedomain.com/blog/2010/02/article-name

Any ideas on how I can best keep the old url structure and still have zend framework live at /

My thought was move the blog to /blog and do a url rewrite in there to make everything appear as though its at / , but i don't think that will work ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

忘你却要生生世世 2024-08-28 22:48:28

为您的网站创建一个子域。 wordpress.site.com 用于 WordPress,zend.site.com 用于您的 zend 代码。当然,您应该使用比这更好的名称,但您明白了。

如果您使用 apache,请将其放入您的 .conf 中

<VirtualHost *:80>
    DocumentRoot /home/www/html/blog
    ServerName blog.site.com
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /home/www/html/zend
    ServerName zend.site.com
</VirtualHost>

Create a subdomain for your site. wordpress.site.com is for wordpress, zend.site.com is for your zend code. Of course you should use better names than that but you get the idea.

if you are using apache, put this in your .conf

<VirtualHost *:80>
    DocumentRoot /home/www/html/blog
    ServerName blog.site.com
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /home/www/html/zend
    ServerName zend.site.com
</VirtualHost>
自由范儿 2024-08-28 22:48:28

mod_rewrite 可以做到这一点,前提是您的 Zend 控制器只有 [a..z] 字符。

http://httpd.apache.org/docs/1.3/mod/mod_rewrite。 html

mod_rewrite could do this, provided that your Zend controllers only have [a..z] chars.

http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文