开发者

Setting up Drupal and Wordpress under a single document root

I have a hosting account开发者_StackOverflow社区 which provides me a folder to publish my files for my domain (say www.example.com). I have set up Drupal for www.example.com with .htaccess at the top folder to enable clean-urls for the Drupal installation. Now I want to have a Wordpress installation under www.example.com/blog/ and have clean URLs for that blog. But while using .htaccess it is not working ok as the .htaccess at the top folder will override the sub-folder one. How to achieve what I intend to?


This really depends on the exact content of your respective .htaccess files.

One workaround is to add a RewriteCond to the head of the main .htaccess file that, if the request URI matches the sub-directory, stops parsing:

RewriteCond %{REQUEST_URI} ^/blog
RewriteRule .* - [L]

this should lead to the blog URLs being parsed properly, based on the rules specified there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜