trusbuy Posted October 2, 2010 Share Posted October 2, 2010 I enable the friendly URL in preference and create a blank .htacces file under the dire / and I click the tab tool to generate the .htacces file but the web server return a 500 errorWhat 's wrong? How can I fix this?Thx Link to comment Share on other sites More sharing options...
jhnstcks Posted October 2, 2010 Share Posted October 2, 2010 Check the permissions on the htaccess file. Try changing it to 666 and try to generate the content, if it works change it back to 644 afterwards Link to comment Share on other sites More sharing options...
trusbuy Posted October 3, 2010 Author Share Posted October 3, 2010 I am sorry but can you describe how to change the permission? I am a total freshman on this.By the way the is 666 and 645?Thank you Link to comment Share on other sites More sharing options...
Prestacampus Posted October 3, 2010 Share Posted October 3, 2010 first ensure that you have put the htaccess under the root of the prestashop install, then to schange the permission just go to your favorite ftp software and edit the permission of your file to 755 for example. What is your ftp client? Link to comment Share on other sites More sharing options...
trusbuy Posted October 3, 2010 Author Share Posted October 3, 2010 I think I understand what you mean by 666. But what if I am testing the system on my own computer and using localhost? how should I change the permission to 666? I tried and can't do it using FTP cilent Link to comment Share on other sites More sharing options...
trusbuy Posted October 3, 2010 Author Share Posted October 3, 2010 And I also tested this on the web server, where I change the permission of the .htacces file to 666, And still when I click generator there's error returned like this:500 Error - Internal Server ErrorThis error was caused due to an unexpected difficulty in fulfilling the user request. The most likely cause of this error is a crashed or error'd CGI script or program. Please verify that the program is properly compiled and/or operational and carry out any necessary debugging.If you are not responsible for this resource, please send a bug-report to the address listed below describing your problem. Please include in the report the date, time, your e-mail address, the website on which this error occured and what you were attempting to do when this error occured. Your compliance is appreciated. Link to comment Share on other sites More sharing options...
chineseboy Posted October 5, 2010 Share Posted October 5, 2010 It's probably permissions. You should be able to change permissions with whatever program you are using to FTP your files. Link to comment Share on other sites More sharing options...
Prestacampus Posted October 5, 2010 Share Posted October 5, 2010 not an expert in Linux, but verify that that file owner is nto to root or something like this Link to comment Share on other sites More sharing options...
chadwick Posted October 8, 2010 Share Posted October 8, 2010 Umm this comes a little late but perhaps you should not leave the file blank. I used this code in my file to keep from getting the 500 internal error message:: order allow, deny deny from all This is what I used to get started. However, the friendly URL is showing the cat id number then - (keyword) so I am still looking into how to make a url friendly. I did find some modules, but I wanna test the options and wait for Google to crawl my site and see if they are able to find the and see the file-extensions. I am not sure but I thought too many .htaccess can get you banned. So having a bunch of re-writes for the entire site seems to make me a little paranoid.I shall return in a day or two with some answers Link to comment Share on other sites More sharing options...
chadwick Posted October 8, 2010 Share Posted October 8, 2010 oh and if you wanna change the permissions, the gui that use use to maniplate or ftp files to your server, should have a radio button that you can select where you can change the permissions. If you do not have a gui and all you have is the command line shell, then just Google "changing file permission command line" that should get you going in the right direction. Sorry I hope this helps, just thinking outside the box about your problem. You know you can also generate a .htaccess file from the "tools" part of your back office. Should look something like this::: # .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$ /img/p/$1-$2$3.jpg [QSA,L,E] RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg [QSA,L,E] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [QSA,L,E] RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang;=$1$5 [QSA,L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang;=$1$4 [QSA,L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang;=$1 [QSA,L,E] RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2$4 [QSA,L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$1$3 [QSA,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] RewriteRule ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E] # Catch 404 errors ErrorDocument 404 /404.php Last, I am going to look into the url rewrites againse known SEO rules and make sure this will not get your pages banned by Google. If not, then I see a module might be out there to handle this problem. :-)) Link to comment Share on other sites More sharing options...
missfriendly Posted October 9, 2010 Share Posted October 9, 2010 First, I believe I read somewhere that Google penalises temporary 302 redirects, but not 301s.... the webmaster tools on Google allows you to tell them about redirected webpages.Second - help with htaccess...I use this website to generate my 'initial' rewrite rule (so I have a template to work from):http://searchfriendlyurls.com/Then I write a PHP script to create the rest of the .htaccess file - for example: //Get each product from DB $products_name_query = "select products_id,products_name from products"; $result = mysql_query($products_name_query); //Loop results while($row = mysql_fetch_assoc($result)) { //My code to format the URLs to how I've rewritten them $string_to_be_stripped = $row['products_name']; $new_string = ereg_replace("[^A-Za-z0-9]", "", $string_to_be_stripped ); $name = strtolower(str_replace(" ","_",$new_string)); $id = $row['products_id']; //echo the format echo "RewriteRule ^".$name."\.html$ //product_info.php?products_id=".$id." [L] "; } Copy & paste output of script to .htaccess file. This is just an example & will need to be tweaked for Presta... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now