Next Webinar: Maximizing Magento - Get the Most out of Promotions. Register Today!

Magento

Open Source eCommerce Evolved

Magento Forum

   
Mod Rewrite Issue? 
 
Eminent Style
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2008-02-17
Peterborough, United Kingdom
 

Version: Magento 1.0
Hosting: 1and1 Business Pro (UK)
PHP: Version 5.2.5
SQL: 5.0 (+)
location: http://www.myDomain.com/_currentWork/magento/

The installation was a success and initially all appeared to be working ok.

Unfortunately, my problem is with the links on the homepage. During the installation I chose to use web server rewrites but when you click on any links on the homepage it just resolves to the /index.php page.

An example of the links when ‘Use Web Server Rewrites’ is set to ‘Yes’ is the ‘My Account’ link in the header.
http://www.myDomain.com/_currentWork/magento/customer/account/
when I click on it, I get taken to the home page:
http://www.myDomain.com/_currentWork/magento/index.php

In the Dashboard, if I go to system -> configuration -> web and set ‘Use Web Server Rewrites’ to ‘No’ all the links work but with the index.php in the address bar.

The only settings I have changed from a default install are in ‘system’ -> ‘configuration’ -> ‘general’ page where I have set the country to ‘United Kingdom’, the timezone to ‘GMT (Europe / Dublin)’ and the locale to ‘English (United Kingdom)’. In the .htaccess I have enabled php5 (required for 1and1) and changed the rewritebase to the location of my install. /_currentWork/magento/

I have attached my PHP info which I think is correct and my .htaccess file which is where the problem lies I think.

Has anyone any suggestions on how to fix this, I would like to use server rewrites?  Thanks in advance.

File Attachments
phpinfo.html  (File Size: 60KB - Downloads: 25)
htaccess.txt  (File Size: 4KB - Downloads: 88)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Simon King
Member
 
Avatar
Total Posts:  45
Joined:  2008-01-10
 

If you’re using the .htaccess from magento untouched, it should be right. It may be that your apache server configuration is either missing mod_rewrite or isn’t allowing the .htaccess file to set rewrites up.

So things to try are:

1. Making sure mod_rewrite is installed and enabled
2. Making sure you have an entry in your httpd configuration to AllowOverride All - something like

<Directory /var/www/magento>
AllowOverride All
</Directory>

Hope that helps

 Signature 

-----------------
Organic Internet & Mobile
Mobile & Web Application Design & Development
Yorkshire, UK

 
Magento Community Magento Community
Magento Community
Magento Community
 
Eminent Style
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2008-02-17
Peterborough, United Kingdom
 
Simon King - 05 April 2008 10:20 AM

So things to try are:

1. Making sure mod_rewrite is installed and enabled
2. Making sure you have an entry in your httpd configuration to AllowOverride All - something like

<Directory /var/www/magento>
AllowOverride All
</Directory>

Hope that helps

Hi Simon, thanks for your response. I would consider myself a designer rather than a developer and my knowledge of linux based servers is pretty thin.

How would I check these and am I likely to have access to be able to check on a shared hosting account?

FYI, If it makes any difference I have various Wordpress based sites that use full friendly urls (with .htaccess) so I don’t think its to do with my hosting, though I bow to your superior knowledge. grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
Simon King
Member
 
Avatar
Total Posts:  45
Joined:  2008-01-10
 
Eminent Style - 05 April 2008 10:47 AM

Hi Simon, thanks for your response. I would consider myself a designer rather than a developer and my knowledge of linux based servers is pretty thin.

are you available for hire? ;o)

Eminent Style - 05 April 2008 10:47 AM

FYI, If it makes any difference I have various Wordpress based sites that use full friendly urls (with .htaccess) so I don’t think its to do with my hosting, though I bow to your superior knowledge. grin

Ah ok. I know nothing about wordpress, but it sounds like your mod_rewrite set up is fine.

I’ve just tried mirroring your setup with a /_currentWork/magento directory and it seems to be working fine for me with rewrites on and without having to modify the standard magento ,htaccess file at all. Try commenting that RewriteBase line back in and see what happens.

Cheers,
Simon

 Signature 

-----------------
Organic Internet & Mobile
Mobile & Web Application Design & Development
Yorkshire, UK

 
Magento Community Magento Community
Magento Community
Magento Community
 
Eminent Style
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2008-02-17
Peterborough, United Kingdom
 

Whoot, issue resolved - I think I have been staring at the computer screen for too long!

As you suggested, I commented it out and turned on the rewrites again in the dashboard but I got 404 errors from my server not the Magneto system. So I took another look at my htaccess file and realised I had the following:

RewriteBase /_currentwork/magento/

- no, uppercase W in the ‘work’ bit. It hadn’t occurred to me that it was case sensitive.

Sorry to have wasted your time, thanks for all your effort anyway. I owe you one.

Joking aside I am available for hire for design / xhtml & CSS coding but have got work on now until probably around June 1st. Keep me in mind and I would be happy to quote.

 
Magento Community Magento Community
Magento Community
Magento Community
 
parkysbgshack
Jr. Member
 
Total Posts:  2
Joined:  2008-04-06
 

hey guys my problem is kind of similar but have not been able to figure out after see what you guys have done maybe it is just due to my complete ignorance but I also have had a successful instalation of v1.0 with sample data and the homepage comes up and looks great but then none of the links off the main page work please check it out if you have a second thanks for any help in advance i have re-installed this thing like 20x and it is getting old but i get the same problem every time problem is at: magento.emagine-it.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
parkysbgshack
Jr. Member
 
Total Posts:  2
Joined:  2008-04-06
 

my issue has been resolved it was a combination of not brining over the .htaccess file while doing a cp command and also in your httpd.conf having AllowOveride set to All on the correct directory.  grin laters

 
Magento Community Magento Community
Magento Community
Magento Community
 
Donovan
Jr. Member
 
Avatar
Total Posts:  12
Joined:  2007-11-27
Halifax, NS
 
Simon King - 05 April 2008 10:20 AM

2. Making sure you have an entry in your httpd configuration to AllowOverride All - something like

<Directory /var/www/magento>
AllowOverride All
</Directory>

Hope that helps

Thanks!  My VPS needed this entry too!

...Donovan

 
Magento Community Magento Community
Magento Community
Magento Community
 
Yizi
Jr. Member
 
Total Posts:  19
Joined:  2008-06-22
 

I have the same problem and i installed the Magento in my root so is my rewrite going to be like:

RewriteBase /

I did it and its still not showing the link.
Anyone can help?

 
Magento Community Magento Community
Magento Community
Magento Community
 
digitalcrypto
Jr. Member
 
Total Posts:  6
Joined:  2008-05-23
 

A mod_rewrite check during installation would be a good idea for Magento.  There is an example of how this is done in the Drupal project so you don’t waste time trying to figure out what’s broken after installation.

 
Magento Community Magento Community
Magento Community
Magento Community
 
digitalcrypto
Jr. Member
 
Total Posts:  6
Joined:  2008-05-23
 
Yizi - 26 June 2008 12:36 PM

I have the same problem and i installed the Magento in my root so is my rewrite going to be like:

RewriteBase /

I did it and its still not showing the link.
Anyone can help?

If you have Magento installed in something like /var/www/html/magento and you have a <Directory> tag on /var/www/html set to AllowOverride None then this takes precendence on your sub directory as well because it is inherited. 

Simply go to your httpd.conf and comment out the /var/www/html directive or remove it completely and then it should work for you.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
40795 users|235 users currently online|87431 forum posts