Jump to content

.htaccess rewriting (hiding a folder) problem


Recommended Posts

Hi!
My problem is that i want to hide a folder in the URL. As a lots of people i installed the prestashop into a folder ( prestashop ) so my adress is www.something.com/prestashop.
I activated the frendly URL in the options so i have an .htaccess file whit thiss code:

# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/p/$1-$2$3.jpg [L,E]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/c/$1$2.jpg [L,E]
RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$3&isolang;=$1$5 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$2&isolang;=$1$4 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/category.php?id_category=$2&isolang;=$1 [QSA,L,E]
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /prestashop/supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /prestashop/manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteRule ^lang-([a-z]{2})/(.*)$ /prestashop/$2?isolang=$1 [QSA,L,E]

# Catch 404 errors
ErrorDocument 404 /prestashop/404.php




I want to hide that prestashop word in my URL. I tried some modifications in this code but not worked.
If some know the trick pls help me.

Thanks

Link to comment
Share on other sites

  • 9 months later...

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