可以laravel& wordpress一起玩?

时间:2015-04-22 17:04:12

标签: php wordpress apache laravel

这是我的问题与laravel& WordPress的:     

    i need to put a blog inside laravel installation. 
    i want to use WordPress but i can't figure it out.
    i put the WP files inside public/blog/ but i can't install it.
    the redirect is the error part.
    i need to say that to Apache: 
    

  if( $url = public/blog/* ){
     ignore normal laravel routing system & redirect to WordPress inside (public/blog/*)
  }

2 个答案:

答案 0 :(得分:1)

要保持你的laravel .htaccess干净,只需使用干净的网址(或查看wordpress doc)从任何活动的wordpress项目中复制.htaccess,然后将其复制到public / bloc中的干净wordpress文件夹中(它几乎是与laravel相同。

如果你的博客文件夹中没有.htaccess,那么laravel" public / .htaccess"将所有非特定和现有文件的URL重定向到" public / index.php"

答案 1 :(得分:0)

要解决此问题,我只将laravel文件夹放在wpBlog文件夹旁边。 &used命名空间可根据使用的url将用户重定向到每个命名空间。 因此:-

blog.website.com : will redirect to the wp blog
site.website.com : will redirect to the laravel website