Lots of overcomplication going on in this thread. Here’s what worked for me with 1.1.8:
Givens (Substitute as necessary)
a. /public_html/ is your root web directory
b. /public_html/magento/ is where you want to store Magento
c. domain.com is your domain name
Steps
1. Install Magento to /public_html/magento/ normally. Do not change Base URL during installation.
2. Copy /public_html/magento/.htaccess to /public_html/.htaccess
3. Copy /public_html/magento/index.php to /public_html/index.php
4. Edit /public_html/index.php line 32 to read:
$mageFilename = 'magento/app/Mage.php';
5. Log into Magento Admin. Go to System > Configuration > Web
6. Under Unsecure change Base Link URL to http://domain.com/
7. Under Secure change Base Link URL to https://domain.com/
This with additional steps from bbodine1 works fine in version 1.3.0 too.
Hi, most URL works fine, however i am unable to load system->magento connect->magento connect manager, any solution?
Here’s what I typically do when installing Magento inside a subdirectory.
Givens (Substitute as necessary)
a. /public_html/ is your root web directory
b. /public_html/magento/ is the directory where Magento will be installed
c. http://www.domain.com is the domain name which points to your root directory
Steps
1. Extract the Magento files to your /public_html/magento/ directory
2. Navigate to http://www.domain.com/magento and install Magento as normal (Don’t change the Base URL during installation)
3. After installing Magento, log into the backend and disable all cache (Don’t log out, you will need to change some settings later)
4. Copy /public_html/magento/.htaccess to /public_html/.htaccess
5. Copy /public_html/magento/index.php to /public_html/index.php
6. Edit /public_html/index.php and make the changes listed below.
Line 40: $compilerConfig = 'magento/includes/config.php'; Line 45: $mageFilename = 'magento/app/Mage.php'; Line 46: $maintenanceFile = 'magento/maintenance.flag'; Line 49: if (is_dir('magento/downloader')) Line 50: header("Location: magento/downloader"); Line 58: include_once dirname(__FILE__) . '/magento/errors/503.php';
7. Navigate to System->Configuration->Web and change your Unsecure and Secure settings to what’s shown below
Base URL: http://www.domain.com/ Base Link URL: {{unsecure_base_url}} Base Skin URL: {{unsecure_base_url}}magento/skin/ Base Media URL: {{unsecure_base_url}}magento/media/ Base JavaScript URL: {{unsecure_base_url}}magento/js/
Base URL: http://www.domain.com/ Base Link URL: {{secure_base_url}} Base Skin URL: {{secure_base_url}}magento/skin/ Base Media URL: {{secure_base_url}}magento/media/ Base JavaScript URL: {{secure_base_url}}magento/js/
8. As a work around for not being able to access the Magento Connect Manager. Add the line below to your /public_html/.htaccess file.
@cupandacu I can’t see how having Magento installed in a sub directory would have a negative impact on search engines. The approach I mentioned above will produce links without the sub directory ("magento") being seen in URL’s. To get a better understanding take a look at the Mage:getBaseUrl() method and the different types of URL’s which can be generated.
For those using this setup, be aware that there is a bug where the “Browse.” & “Upload” media buttons are not displayed when creating or editing product images. Although, I can confirm that it has been fixed in Magento CE 1.5.0.0-beta2. You can read more about this issue here http://www.magentocommerce.com/bug-tracking/issue?issue=10568 with a quick fix.
after
“Here’s what I typically do when installing Magento inside a subdirectory. “
i find this error
Fatal Error Mage.php Line 50
AND FEW WARNING IN LINE 49
Solution :
set absolute path in the file /app/Mage.Php
Line 49 and 50
Here’s what I typically do when installing Magento inside a subdirectory.
Givens (Substitute as necessary)
a. /public_html/ is your root web directory
b. /public_html/magento/ is the directory where Magento will be installed
c. http://www.domain.com is the domain name which points to your root directory
Steps
1. Extract the Magento files to your /public_html/magento/ directory
2. Navigate to http://www.domain.com/magento and install Magento as normal (Don’t change the Base URL during installation)
3. After installing Magento, log into the backend and disable all cache (Don’t log out, you will need to change some settings later)
4. Copy /public_html/magento/.htaccess to /public_html/.htaccess
5. Copy /public_html/magento/index.php to /public_html/index.php
6. Edit /public_html/index.php and make the changes listed below.
Line 40: $compilerConfig = 'magento/includes/config.php'; Line 45: $mageFilename = 'magento/app/Mage.php'; Line 46: $maintenanceFile = 'magento/maintenance.flag'; Line 49: if (is_dir('magento/downloader')) Line 58: include_once dirname(__FILE__) . '/magento/errors/503.php';
7. Navigate to System->Configuration->Web and change your Unsecure and Secure settings to what’s shown below
Base URL: http://www.domain.com/ Base Link URL: {{unsecure_base_url}} Base Skin URL: {{unsecure_base_url}}magento/skin/ Base Media URL: {{unsecure_base_url}}magento/media/ Base JavaScript URL: {{unsecure_base_url}}magento/js/
Base URL: http://www.domain.com/ Base Link URL: {{secure_base_url}} Base Skin URL: {{secure_base_url}}magento/skin/ Base Media URL: {{secure_base_url}}magento/media/ Base JavaScript URL: {{secure_base_url}}magento/js/
8. Save the changes and your done.
Just gone through these instructions and everything worked fine. Even down to the upload and browse buttons disappearing. I followed Ontic instructions on how to get these back and that worked as well. So all in all this is a good method on how to achieve this. However, because I had to edit the core code, I do not think this is wise.
I for instance need another shop using Magentos multi shop features and I am now worried that the solution above will cause issues in a multi shop environment.
So I think we should keep this thread going until someone has a solution to this problem.
@Sistemi Informativi - You have screwed something up, try a fresh install and follow my instructions, you shouldn’t have to edit Mage.php
@albertramsbottom - I’m glad to hear you got things up and running. If you followed my instruction correctly then you shouldn’t have any problems using Magento in a multi-website/store environment (I’ve used this setup with multiple websites and stores using individual domains, without any problems). What issues are you having? I may be able to help.
@Sistemi Informativi - You have screwed something up, try a fresh install and follow my instructions, you shouldn’t have to edit Mage.php
@albertramsbottom - I’m glad to hear you got things up and running. If you followed my instruction correctly then you shouldn’t have any problems using Magento in a multi-website/store environment (I’ve used this setup with multiple websites and stores using individual domains, without any problems). What issues are you having? I may be able to help.
@Sistemi Informativi - You have screwed something up, try a fresh install and follow my instructions, you shouldn’t have to edit Mage.php
@albertramsbottom - I’m glad to hear you got things up and running. If you followed my instruction correctly then you shouldn’t have any problems using Magento in a multi-website/store environment (I’ve used this setup with multiple websites and stores using individual domains, without any problems). What issues are you having? I may be able to help.
Well I went on with my multistore thing and got stuck. I have actually posted another for some help on this issue
I’ve been using this setup for a long time but I just updated to 1.4.2 and I can’t get the downloader link to work without creating a symlink from the root.
I did change the line involving the downloader in the index.php file.