Reputation: 2113
I have a website which was built by CakePHP. I want Blog section to be built with Wordpress so I upload a Wordpress folder to /app/webroot/ folder and rename it to 'blog'. I installed Wordpress normally. In the homepage, I show the link to Blog section with the code
<?php echo $this->webroot. '/blog'; ?>
I have checked it and it showed 'http//mydomain.com/blog' but I clicked that link, it automatically redirected to 'http//mydomain.com/app/webroot/blog'.
I just want the link to be redirected to 'http//mydomain.com/blog'. How can I do it?
P/S: I am sorry for my bad English.
Upvotes: 2
Views: 1222
Reputation: 1377
I have some blog in my webroot and have added the following to my htaccess:
RewriteCond %{REQUEST_URI} ^/blog/(.*)$
RewriteRule ^.*$ - [L]
And this is fine if I type:
www.mydomain.com/blog/
However if I dont put the trailing slash (www.mydomain.com/blog) I get redirected to:
www.mydomain.com/app/webroot/blog/
Upvotes: 0
Reputation: 4517
Sounds like, when you ran the WP install you didn't go into the database and change the url paths to /blog. This article should help. http://www.balistupa.com/blog/2010/08/how-to-redirect-appwebrootblog-into-blog-wordpress-cakephp/
Upvotes: 2