Jump to content

Configure Friendly URL / mod_rewrite with IIS7 [CGI]


Recommended Posts

Hey,

 

I installed URL Rewrite and ISAPI rewrite manager.

I linked my .htacess to my webiste on ISAPI rewrite but the friendly URL is not working anymore.

I used phpinfo() and mod_rewrite is not enabled, neither loaded.

 

How should i do for setting the mod_rewrite correctly ?

 

Thank in advance.

 

Version prestashop : 1.5.

Link to comment
Share on other sites

  • 1 month later...

I found this to be added in the .htaccess , but there's a problem in my website, the product images and other images are just not being linked properly. here is the code:

 

# URL rewriting module activation

RewriteEngine on

RewriteCond %{REQUEST_METHOD} !^(TRACE|TRACK|GET|POST|HEAD)$

RewriteRule .* - [F]

RewriteBase /

Options +FollowSymLinks

 

# URL rewriting rules

RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E]

RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E]

RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E]

RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L,E]

RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E]

RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]

 

# Catch 404 errors

ErrorDocument 404 /404.php

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...