Jump to content

.htaccess, Friendly URLs and mod_rewrite?


Recommended Posts

Just installed 1.5.4. When I go to the SEO & URLs Preferences page, there is a warning by the Friendly URLs radio buttons:

 

URL rewriting (mod_rewrite) is not active on your server, or it is not possible to check your server configuration. If you want to use Friendly URLs, you must activate this mod.

 

I can't see a module with the name "mod_rewrite". What do I need to do?

 

I'm only asking because I've installed some languages, and when I select one, I get an "Access denied" error for URLs such as /shop/it, /shop/fr, etc.

Link to comment
Share on other sites

mod_rewrite isn't prestashop module . What it is?

 

Mod_rewrite provides a powerful way to do URL manipulations. With it you can nearly do all types of URL manipulations you ever dreamed about. The price you have to pay is to accept complexity, because mod_rewrite's major drawback is that it is not easy to understand and use for the beginner. And even Apache experts sometimes discover new aspects where mod_rewrite can help.

 

more informations about mod_rewrite you can read here: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

 

you've got shared hosting? Or maybe dedicated / vps server?

Link to comment
Share on other sites

So it's part of Apache? Then how do I use it for Prestashop? Or more importantly, how do I get friendly urls to work on 1.5.4?

 

Friendly URLs have worked fine in previous versions on my web host, so is this just another one of the many changes to PS that doesn't work on my host?

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

The instructions to regenerate the file just says to turn friendly urls off and on. I've done that several times, and several other of the related settings. No .htaccess file.

Did'nt previous versions have a "Generate .htaccess" button?

Link to comment
Share on other sites

I'm saying the Friendly URLs work in previous versions. How they are implemented, I have no idea. My web host has declined to make changes to PHP.ini as it's a shared resource, so I don't if they will configure anything differently for me.

Link to comment
Share on other sites

I have created a blank .htaccess file, and turned Friendly URLs off and on again. Still no joy.

Basically, using Friendly URLs gives Access Denied errors to any page in the Front office.

 

I'll ask my hosts what the problem with PS is.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

I have just installed PS 1.5.4 on a VPS server. I would like to have friendly urls. What is the next step?

 

I have looked at the apache link posted earlier and have no idea what I'm looking at lol! Is there a step by step on activating mod_rewrite somewhere?

Link to comment
Share on other sites

Thanks for the reply,

 

Bare with me on this subject because this one has me totally lost.

 

I've spoken with my host and they have verified that mod_rewrite is already installed on my VPS.

 

I just need to set the rules in .htaccess and it will work.

 

That is the part I'm stuck on. What are the rules? Is there something I can copy/paste from somewhere or are they custom to each server/installation?

Link to comment
Share on other sites

so if you've got it on your VPS server, you don't have to enable it. What to do? just turn on friendly urls in your back office

if it will work - it mean that everything is okay.

 

You don't have to worry if you see in bo information that your server hasn't got it, it's because the permissions - script cant check the server configuration

  • Like 1
Link to comment
Share on other sites

I have the same issue on my VPS with 1.5.4:

could this be of any concern?

 

Optional parameters: Please fix the following error(s)

  • mcrypt

 

You need an php extension mcrypt. You should ask your host about this extension. Alternatively, you can change the ciphering method under Advance Parameters>Performance "Keep the custom Blowfish class" . However, ideally your host should have the mcrypt extension enabled for best performance.

Link to comment
Share on other sites

I have a similar problem: with Friendly URL on I have no more access to my frontpage in a bilingual shop (german works /spanish not), turning off it works. mod_rewrite on the apache is on, I regenerated .htaccess with success. Any idea?

  • Like 1
Link to comment
Share on other sites

I have a similar problem: with Friendly URL on I have no more access to my frontpage in a bilingual shop (german works /spanish not), turning off it works. mod_rewrite on the apache is on, I regenerated .htaccess with success. Any idea?

 

Hi, what is the store URL?

 

When you change languages to spanish, does the URL end with a "/"

 

If not, when you add the "/" to the end of www.shopdomain.com/es/ does it work?

Link to comment
Share on other sites

so if you've got it on your VPS server, you don't have to enable it. What to do? just turn on friendly urls in your back office

if it will work - it mean that everything is okay.

 

You don't have to worry if you see in bo information that your server hasn't got it, it's because the permissions - script cant check the server configuration

 

 

Once again vekia thank you so much for your help! Everything works perfectly!

Link to comment
Share on other sites

  • 1 month later...
  • 3 years later...

Hello everyone!

 

I have been reading hundreds of post about Friendly URLs in order to find someone with the same problem as me. Then I found Adeep here:

 

I have a similar problem: with Friendly URL on I have no more access to my frontpage in a bilingual shop (german works /spanish not), turning off it works. mod_rewrite on the apache is on, I regenerated .htaccess with success. Any idea?

 

I had exactly the same issue and couldn't figure out why nothing else worked. So I tried his solution here under:

@prestateam - Thanks for your help. I could solve the problem. The problem was, the startpage endet withdomain.com/es/ and on my serever there was (don't no why) a folder named /es/.
Thanks again

 

and it worked perfectly! It also makes total sense but I guess my head was just too full of information.  :P

 

So, in case, someone is in the same trouble as I was, I want to confirm that Adeep's solution works.

 

Just check if you do not have folders en/ or de/ or sp/ at the root of your website. They will block the friendly url of the index homepage! :)

 

THANKS ADEEP!!!
:D
  :D  :D 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...