admin管理员组文章数量:1406937
I'm working on a really odd site which has a couple of Magento installs next to a Wordpress install.
the folder structure looks like this:
/shop (magento)
/shop-world (magento)
/wp
.htaccess
I just installed Yoast on the Wordpress install and the first thing it did was edit the Wordpress .htaccess settings without creating a backup.
How can I edit this:
# BEGIN 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>
# END WordPress
So that instead of routing all requests through index.php
(which doesn't exist) the site routes all requests through wp/index.php
? I tried adding wp/
on the necessary lines but its not working, and I'm getting an internal server error.
Disclaimer: I didn't make the site like this – but I do need to fix it without moving all the files.
I'm working on a really odd site which has a couple of Magento installs next to a Wordpress install.
the folder structure looks like this:
/shop (magento)
/shop-world (magento)
/wp
.htaccess
I just installed Yoast on the Wordpress install and the first thing it did was edit the Wordpress .htaccess settings without creating a backup.
How can I edit this:
# BEGIN 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>
# END WordPress
So that instead of routing all requests through index.php
(which doesn't exist) the site routes all requests through wp/index.php
? I tried adding wp/
on the necessary lines but its not working, and I'm getting an internal server error.
Disclaimer: I didn't make the site like this – but I do need to fix it without moving all the files.
Share Improve this question asked Oct 28, 2015 at 20:03 DjaveDjave 2584 silver badges25 bronze badges1 Answer
Reset to default 2Rather than change .htaccess, move the index.php
up to root, open it, and change:
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
to:
require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );
In Settings, your WordPress address should be http://example/wp
, and Site address should be http://example
.
This process is outlined in the Codex page Giving WordPress Its Own Directory.
本文标签: routinghtaccess for wordpress in separate folder
版权声明:本文标题:routing - .htaccess for wordpress in separate folder 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744973090a2635353.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论