Jump to content
Sign in to follow this  
Sportvoeding-GezondOntbijt

problem with mod-rewrite

Recommended Posts

Hi everyone

I'm new to prestashop and i've found a lot by myself, but i need a little help at this point
The .htacces-generator doesn't work for me, because i have a linux-host instead of an apache

So now i have to manualy write my mo-rewrites
and that' the point where i get into trouble: I don't know all the 'correct' links.

I've been able to rewrite my 3 categories and i think i'll be able to rewrite some more, but not all off them.

Where can i find the original link to:
/content/1-delivery
/content/2-legal-notice
/content/3-terms-and-conditions-of-use
/content/4-about-us
[removed]addBookmark('### /classes/delivery.php ', '###') --- classes/delivery.php shows a empty page if i go there directly ---

Is there a quick way for this?
Cuz i'm afraid i'll also have to manualy rewrite my url's to my products :s

My images don't work either

Share this post


Link to post
Share on other sites

I think your quickest, cheapest and easiest solution would be to switch to an apache server that supports htaccess mod rewrite.

Share this post


Link to post
Share on other sites

The problem is that i've paid for 2 years, that's another 1.5 years

I got a Linux-server now, the other option was Windows
Linux has .htaccess support, but apperently, the generator can't change anything to my .htaccess

Can't I use someone elses htacces? Or wil that give problems ?

Share this post


Link to post
Share on other sites

I think we may have a bit of confusion here, Apache is a web server, not an Operating System (IE linux).
I'll be surprised if you host doesn't use apache (you can check that by printing phpinfo()).
If after you run that, you find out that it is an apache server, then you are probably doing something wrong with your mod-rewrite.
If your host is using a different web server, let me kno wwhat it is and we'll take it from there.

Share this post


Link to post
Share on other sites

Hi

You will most certainly have an Apache web server on your Linux/Unix system
I presume you have followed these instructions and you now have a button to generate your .htaccess content instead of seeing the text below.

Before being able to use this tool, you need to:

- create a .htaccess blank file in dir: /prestashop/ *My Path*


- give it write permissions (chmod 777 on Unix system)

This is the generated content of the .htaccess if you need to do it manually friendly URL's turned on, my test site is in a folder called prestashop
you just need to change the paths to yours.


#.htaccess automaticaly generated by PrestaShop e-commerce open-source solution


#http://www.prestashop.com - http://www.prestashop.com/forums

#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


Factory Arts
www.factoryarts.co.uk
Web Design & Development

Share this post


Link to post
Share on other sites

I've placed my .htacces in httpfiles/prestashop/ just like the rest of my files.
I CHMOD'ed my .htaccess to 777
Then I pressed the button at of the generator (whitout 777 CHMOD, I see the text)

But nothing happens

I' like to use your mod-rewrite, but i'd still have to change everything manaly

This is what I'e made so far:

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

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

# Vriendelijke URLs
RewriteEngine On
RewriteRule ^5-sport category.php?id_category=5
RewriteRule ^6-voeding category.php?id_category=6
RewriteRule ^7-wellness category.php?id_category=7



As you can see, I actualy DO have a little part made by PS, bu i've made everything starting @ # Vriendelijke URLs (Friendly URLs)

Share this post


Link to post
Share on other sites
I've placed my .htacces in httpfiles/prestashop/ just like the rest of my files.
I CHMOD'ed my .htaccess to 777
Then I pressed the button at of the generator (whitout 777 CHMOD, I see the text)

But nothing happens

I' like to use your mod-rewrite, but i'd still have to change everything manaly

This is what I'e made so far:
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

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

# Vriendelijke URLs
RewriteEngine On
RewriteRule ^5-sport category.php?id_category=5
RewriteRule ^6-voeding category.php?id_category=6
RewriteRule ^7-wellness category.php?id_category=7



As you can see, I actualy DO have a little part made by PS, bu i've made everything starting @ # Vriendelijke URLs (Friendly URLs)



Looks like you could have a problem with permissions check again if your .htaccess is 777 not 644 if it is still 644 then your server is not allowing 777 on that file.

Share this post


Link to post
Share on other sites

The 1st problem is gone and now i have a 2n one

Suddenly, all my products are gone.
I can't see any category on my site: http://sportvoeding-gezondontbijt.be/prestashop/
If I visit a product (like http://sportvoeding-gezondontbijt.be/prestashop/sportproducten/13-nrg-tabletten.html) from my history, I get:
you do not have access to this product

Share this post


Link to post
Share on other sites

The only way this is going to be fixed is either to start again or pay someone to fix it for you, a hands on approach is required as it could take forever to do it on this forum.

Factory Arts
http://www.factoryarts.co.uk
Web Design & Development

Share this post


Link to post
Share on other sites

I don't know what I could have done wrong.
I changed my homepage, fixed htacces problem and mybe some little other things

So i'll have to re-install PS (again) ?!

According to a reaction at an other topic, i had deleted my products-module
If i replaced all the modules i hided (the red X'es), i can see a "New Products" panel, but i says: "No new products." (see: http://sportvoeding-gezondontbijt.be/prestashop/lang-en/new-products.php)

None of these are installed:
Products - 4 modules
RSS products feed v0.2 Generate a RSS products feed
Product Comments v0.2 Allow users to post comment about a product
Products Category v1.2.1 Display products of the same category on the product page
Send to a Friend module v1.1 Allows customers to send a product link to a friend

But I do have:
Featured Products on the homepage
Viewed products block
New products block

I also have Categories block at the left, but you don't see it at my Front Office

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More