Site icon Hip-Hop Website Design and Development

WordPress + Magento .htaccess ReWriteRule Situation (www vs. non-www)

I’ve a difficulty I have been dealing with for a bit now. Moved away from it, however now I am again and simply don’t know after looking for an answer on-line. It appears people have confronted comparable points, however making an attempt out frequent fixes has resulted in simply 500 Inner Server Errors.

I am going to attempt to be as thorough as attainable in my clarification.

OK, so onto the problem.

I’ve a website utilizing WordPress and Magento. The WP pages are saved in a subdirectory (/about/) so when a consumer accesses one of many pages, the url seems like this: www.instance.com/about/wordpresspage/. We have now a merchandise web page that’s saved outdoors of WP and is accessed immediately, the url seems like this: www.instance.com/magentoproductpage/.

The problem arises when a consumer tries to go to the non-www url.

If I take away the “www.” from the magento web page url (instance.com/magentoproductpage/) I’m redirected to www.instance.com/index.php. I do know why this happens however haven’t got a repair for it, but.

The extra obvious concern is when making an attempt to entry a WP web page with out “www.”.

So as an example I take away that from my earlier instance (instance.com/about/wordpresspage/) I’m redirected to a 404 web page, and moreover the URL now turns into this: instance.com/cgi-bin/php/about/index.php

This solely appears to happen in Google Chrome and never in Firefox. Clearly the concept right here is that I simply need to add www. to non-www URLs.

Any ideas? Thanks upfront.