Jump to content

[SOLVED] Friendly urls are rewritten but not found


Recommended Posts

Hello all,

i'm at the end of my rope here and desperatly need help from the community.

I'm running PS 1.5.4 on a VPS.

Everything works fine without friendly urls. But when freindly urls are enabled i can only see the home page but without product images. When hovering over links the friendly urls are clearly in effect, so that part is working. But trying to open any page besides home results in the following error. For example, http://living-organi...-oil-450ml.html results in this:

Not Found

 

The requested URL /en/healthy-oils/10-flax-oil-450ml.html was not found on this server.

 

 

So that makes me think that the problem lies with .htaccess file. But since it's auto-generated i'm stumped as to what else i can do.

 

I did see a discussion about the differences for Apache running with the CGI interface, but it also mentioned that it should have been resolved in 1.5.3.

Other than that none of the forum threads that i could find address this problem.

 

Please help.

Edited by vekia (see edit history)
Link to comment
Share on other sites

So after several more hours of poking around i have finally figured this problem out. The issue was with the AllowOverride directive in Apache configuration. The default site configuration on my VPS (and probably on most other VPS and shared hosting accounts) is

AllowOverride None

which tells apache to essentially ignore .htaccess. This was happening because i installed PS into the default location under /var/www. So the solution would be to either change the default configuration (which is not advisable) or create a virtual host in a different directory, and that's what i did.

After setting up a new name based virtual host all i needed to do is to specify AllowOverride All under the <Directory> apache directive for the virtual host. Here's my virtual host configuration file:

 

  <VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName your_domain.com
    ServerAlias www.your_domain.com
    DocumentRoot /var/www/path/to/virtual_host/folder
    <Directory /var/www/path/to/virtual_host/folder>
	  Options Indexes FollowSymLinks
	  AllowOverride All
	  allow from all
	  DirectoryIndex index.html index.htm default.htm index.php index.pl
    </Directory>
  </VirtualHost>

 

This fixed all of the friendly url issues.

 

Hope this will save somebody a few hours and some hair.

Link to comment
Share on other sites

×
×
  • Create New...