Magento Hosting
by Kyle on · Posted in Hosting, Magento · 2 Comments
I've been reading a lot of posts on the Magento forum about installation troubles, specifically with mod_rewrite (htaccess) and the MySQLi and PDO_MySQL extensions for PHP. As mentioned in our Magento installation guide, Crucial's Split-Shared hosting is fully compatible with Magento.
Regarding the htaccess issues, try using this modified version that was used on our install:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /magento/
RewriteCond %{REQUEST_URI} !^/media/
RewriteCond %{REQUEST_URI} !^/skin/
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_URI} !^/var/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . index.php [L]
The default one worked fine, but we've added a few things. You'll want to change the rewrite base directory to the directory where you installed Magento. If it's not in a sub-directory, then just leave one forward slash there.
In the default htaccess file, the first line in the above example is not included. While this is not a requirement on our servers, as most hosts have this enabled by default, if it is not enabled and you try to do any rewriting, you'll get an internal server error. That line specifically might help.
Rewrite Explanation
The first four rewrite conditions are there in case a missing image, JavaScript, CSS stylesheet, or temporary file is requested.
The next three rewrite conditions check to see if a file, directory, or symbolic link exists.
If a request passes all of the above conditions, it is sent to the index.php file in the magento directory (because that is what we set as our rewrite base).
You can check out our rewrite article if you're interested in learning more about htaccess and rewrites.
![]()
Comments
Don't Be Shy…
You can leave a new comment or reply to one of the comments below.
Ste
I’m currently running 2 websites from one Magento installation and I want to enable Web Server Rewrites for SEO. However, when I do this, I’m getting a 404 Not Found error for the page I’m navigating to.
Rewrites are enabled in Apache and it does work on the base site. It just wont work on the external website.
Any ideas?
Reply
Ste
It’s okay. I’ve fixed it. Was just an issue with my htaccess.
Reply