简体   繁体   English

正确的Apache服务器配置以部署Angular2 + Wordpress

[英]Correct apache server configuration to deploy Angular2 + Wordpress

I build a template for my wordpress site using angular2, and the WP-REST API, Right now I have a working version ( link ) but I have a problem. 我使用angular2和WP-REST API为我的wordpress网站构建了一个模板,现在我有一个有效的版本( link ),但是有问题。 When I open the page on a custom route (not the home) server give 404 error, but using the router links works as I want. 当我在自定义路由(而不是家庭服务器)上打开页面时,出现404错误,但使用路由器链接的操作如我所愿。 to clarify: 澄清:

my .htacces file is the default for Wordpress 我的.htacces文件是Wordpress的默认文件

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

and i'm using the /%postname%/ permalink cfg on my wp backend 而且我在wp后端上使用/%postname%/永久链接cfg

Check your database > wp_options 检查您的数据库> wp_options

option_name siteurl & home option_name 网址首页

option_value http://bellaterra.ireevo.net option_value http://bellaterra.ireevo.net

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

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