Magento & Wordpress integrated rewrites

Hey all,

I have a Magento based site with a WordPress install in a /blog/ directory. I would like to attempt to rewrite the url domain.com/abc to use the page located at domain.com/blog/abc but keep the URL as domain.com/abc. Everytime I attempt this I seem to get caught in some sort of loop with the rewrites that WordPress already uses to function.

Thanks in advance for any help.

Ryan,

I believe you’ve setup WP in the wrong directory. Additionally, I believe that WP offers to hide a directory level (but I don’t know for sure as I loathe canned apps like this). You probably can work around this problem with mod_rewrite but you’ll need to post the code presently in use … after learning how WP controls its generated links (IF WP thinks it’s in your DocumentRoot, it’s far more difficult than if it’s in blog/).

Regards,

DK

Hey DK,

Thanks for the reply, WordPress is actually aware that it is in the subdirectory. Here is the auto generated htaccess that is also sitting in the /blog/ directory

RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]

I dont currently have any rewrites currently in my root since any time I attempt to rewrite to anything in the blog directory I get caught in a loop.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.