Jump to content

GoDaddy and URL Rewriting


Recommended Posts

Hey everyone. I know that this topic has been beat to death, but I cannot get my friend URLs to work with PrestaShop. My site is hosted by GoDaddy. I've pasted my site's info below.

 

Server information

Prestashop version: 1.4.7.0

Server information: Linux #1 SMP Fri Jul 15 08:15:44 EDT 2011 i686

Server software version: Apache

PHP version: 5.2.17

MySQL version: 5.0.92-log

 

Store information

Shop URL: http://www.newenglanddog.com/

Current theme in use: velvetsky

 

 

 

I have tried all of the "fixes" that are posted in various places on the web, and none of them work. I keep getting a "We're sorry, but the Web address you entered is no longer available" 404 error.

 

I'm at my wits end. Everything else has worked so far aside from this issue. I'm actually considering ditching PrestaShop for a paid e-commerce solution, which is embarrassing since I am a software engineer.

 

Please, help me!

Link to comment
Share on other sites

Hey guys! Thank you SO MUCH for responding. The issue is with the navigation tool bar and my CMS pages. For example, I made an "About Us" page at www.newenglanddog.com/about-us and it's not showing up when you hit the "About Us" button from the nav menu, instead, I get a 404 error. When I click "View" next to the CMS page in Back Office -> Tools -> CMS, it brings me to "http://www.newenglanddog.com/content/9-about-us" - which does display correctly.

 

I've tried everything I could find online to add to the .htaccess file. Currently, it looks like this:

 

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# WARNING: PLEASE DO NOT MODIFY THIS FILE MANUALLY. IF NECESSARY, ADD YOUR SPECIFIC CONFIGURATION WITH THE HTACCESS GENERATOR IN BACK OFFICE
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>

# Disable Multiviews
Options -Multiviews

# URL rewriting module activation
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{http_host} ^newenglanddog.com [NC]
RewriteRule ^(.*)$ http://www.newenglanddog.com/$1 [L,R=301]
RewriteBase /

# 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 [L]
RewriteRule ^([0-9]+)\-([0-9]+)/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1-$2.jpg [L]
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$1$2.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L]
RewriteRule ^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$ /img/c/$1.jpg [L]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]
RewriteRule ^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+ /category.php?id_category=$1&noredirect=1 [QSA,L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /category.php?id_category=$1 [QSA,L]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*) /supplier.php?id_supplier=$1 [QSA,L]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*) /manufacturer.php?id_manufacturer=$1 [QSA,L]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms=$1 [QSA,L]
RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms_category=$1 [QSA,L]
RewriteRule ^page-not-found$ /404.php [QSA,L]
RewriteRule ^address$ /address.php [QSA,L]
RewriteRule ^addresses$ /addresses.php [QSA,L]
RewriteRule ^authentication$ /authentication.php [QSA,L]
RewriteRule ^best-sales$ /best-sales.php [QSA,L]
RewriteRule ^cart$ /cart.php [QSA,L]
RewriteRule ^contact-us$ /contact-form.php [QSA,L]
RewriteRule ^discount$ /discount.php [QSA,L]
RewriteRule ^guest-tracking$ /guest-tracking.php [QSA,L]
RewriteRule ^order-history$ /history.php [QSA,L]
RewriteRule ^identity$ /identity.php [QSA,L]
RewriteRule ^manufacturers$ /manufacturer.php [QSA,L]
RewriteRule ^my-account$ /my-account.php [QSA,L]
RewriteRule ^new-products$ /new-products.php [QSA,L]
RewriteRule ^order$ /order.php [QSA,L]
RewriteRule ^order-follow$ /order-follow.php [QSA,L]
RewriteRule ^quick-order$ /order-opc.php [QSA,L]
RewriteRule ^order-slip$ /order-slip.php [QSA,L]
RewriteRule ^password-recovery$ /password.php [QSA,L]
RewriteRule ^prices-drop$ /prices-drop.php [QSA,L]
RewriteRule ^search$ /search.php [QSA,L]
RewriteRule ^sitemap$ /sitemap.php [QSA,L]
RewriteRule ^stores$ /stores.php [QSA,L]
RewriteRule ^supplier$ /supplier.php [QSA,L]
</IfModule>

# Catch 404 errors
ErrorDocument 404 /404.php

 

I have messed around with the contents of the "Disable Multiviews" and "URL rewriting module activation" sections, but nothing has worked.

 

This is driving me crazy. I've been stuck on it for 2 weeks!

Link to comment
Share on other sites

Hey guys! Thank you SO MUCH for responding. The issue is with the navigation tool bar and my CMS pages. For example, I made an "About Us" page at www.newenglanddog.com/about-us and it's not showing up when you hit the "About Us" button from the nav menu, instead, I get a 404 error. When I click "View" next to the CMS page in Back Office -> Tools -> CMS, it brings me to "http://www.newenglanddog.com/content/9-about-us" - which does display correctly.

 

I've tried everything I could find online to add to the .htaccess file. Currently, it looks like this:

 

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# WARNING: PLEASE DO NOT MODIFY THIS FILE MANUALLY. IF NECESSARY, ADD YOUR SPECIFIC CONFIGURATION WITH THE HTACCESS GENERATOR IN BACK OFFICE
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>

# Disable Multiviews
Options -Multiviews

# URL rewriting module activation
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{http_host} ^newenglanddog.com [NC]
RewriteRule ^(.*)$ http://www.newenglanddog.com/$1 [L,R=301]
RewriteBase /

# 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 [L]
RewriteRule ^([0-9]+)\-([0-9]+)/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1-$2.jpg [L]
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$1$2.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L]
RewriteRule ^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$ /img/c/$1.jpg [L]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]
RewriteRule ^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+ /category.php?id_category=$1&noredirect=1 [QSA,L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /category.php?id_category=$1 [QSA,L]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*) /supplier.php?id_supplier=$1 [QSA,L]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*) /manufacturer.php?id_manufacturer=$1 [QSA,L]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms=$1 [QSA,L]
RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms_category=$1 [QSA,L]
RewriteRule ^page-not-found$ /404.php [QSA,L]
RewriteRule ^address$ /address.php [QSA,L]
RewriteRule ^addresses$ /addresses.php [QSA,L]
RewriteRule ^authentication$ /authentication.php [QSA,L]
RewriteRule ^best-sales$ /best-sales.php [QSA,L]
RewriteRule ^cart$ /cart.php [QSA,L]
RewriteRule ^contact-us$ /contact-form.php [QSA,L]
RewriteRule ^discount$ /discount.php [QSA,L]
RewriteRule ^guest-tracking$ /guest-tracking.php [QSA,L]
RewriteRule ^order-history$ /history.php [QSA,L]
RewriteRule ^identity$ /identity.php [QSA,L]
RewriteRule ^manufacturers$ /manufacturer.php [QSA,L]
RewriteRule ^my-account$ /my-account.php [QSA,L]
RewriteRule ^new-products$ /new-products.php [QSA,L]
RewriteRule ^order$ /order.php [QSA,L]
RewriteRule ^order-follow$ /order-follow.php [QSA,L]
RewriteRule ^quick-order$ /order-opc.php [QSA,L]
RewriteRule ^order-slip$ /order-slip.php [QSA,L]
RewriteRule ^password-recovery$ /password.php [QSA,L]
RewriteRule ^prices-drop$ /prices-drop.php [QSA,L]
RewriteRule ^search$ /search.php [QSA,L]
RewriteRule ^sitemap$ /sitemap.php [QSA,L]
RewriteRule ^stores$ /stores.php [QSA,L]
RewriteRule ^supplier$ /supplier.php [QSA,L]
</IfModule>

# Catch 404 errors
ErrorDocument 404 /404.php

 

I have messed around with the contents of the "Disable Multiviews" and "URL rewriting module activation" sections, but nothing has worked.

 

This is driving me crazy. I've been stuck on it for 2 weeks!

Same here first i use a wp theme and now i decided to work with PS and i dont know how to keep my olds links from google i cannot remove the category ID from url

Link to comment
Share on other sites

Is any way to kepp my Wordpress old links to Prestashop 1.4.7.0 or 1.4.7.2 from exampe to example ??????????????????????????????????????????????????????????????????

ABOUT CATEGORIES : www.name.com/refill-hp and now i have www.name.com/1-refill-hp

ABOUT PRODUCTS : www.name.com/refillhp/2-cartdrigehp and now i havewww.name.com/refill-hp/2-cartdrigehp

HELLO WORLD :)

Link to comment
Share on other sites

  • 3 weeks later...

I have the same strange problem, with url redirecting, i'm running presta on cloud server using ubuntu 11.04 server. But what is odd in this strange problem is, that i have copied prestashop to other domain which I own, I put the hole site 1:1 from domain A to domain B, exported and imported .sql file and at domain B, i have edited in ps_configuration the name of the domain to be domain B not A. What is so ODD? It's the behaivior of both sites, my server uses SSL. Domain A has own IP adress on the cloud server, domain B uses the second IP (original) of the cloud server using private SSL key. server.crt and server.key. SO how it is possible cloned sites, to act in different ways. Domain A has this issue with redirecting let's say with /order-history page, but domain B which is the CLONE works as charm, no troubles at all. I don't get the 404 error. Also very important is that if frinedly url is enabled domain A can not show product images, and crashes with 404 error on some pages wich are placed at seo&url section of the backend, but the other cloned domain works with no issues, all images and pages work perfectly under SSL or https://!

Can someone give me direction where could be the problem, I'm using PrestaShop™ 1.4.6.2.

Link to comment
Share on other sites

I solved my problem. Since the hosting that I use is my own server. Server is running with hosting panel, where I previously had enable server to use SSL which is basically the same as to run >a2enmod ssl via SSH client. So I havent notice that hosting panel has different file which commands to appache, and in that file there are settings for that domain for port :443, and paths to the certificate as well. But when I made the install, I have created record in apache/sites-available/, where settings were the same as in the apache file, owned by the hosting panel. And then run a2enssite www.mydomain.com-ssl. reload apache server and that is all. But Godaddy SSL testing Tool was saying unsupported SSL. What have I done? Simply edited the apache config file, owned by the hosting panel and saw that the paths to the SSL key are default, pointing to server.pem and so.... changed them to the real path, and restart apache again. I was thinking well done godaddy testing tool was saying ok! But in fact the SSL was using two config files at the same time, one from the /etc/apache/sites-available/www.mydomain.com-ssl and one from /var/www/hostingpanel/apache.conf file. SO working like that was crashing my product images, and was causing trouble to redirecting and getting 404 error on some pages. Now how I fix it? Just went to /etc/apache/sites-available/www.mydomain.com-ssl and run a2dissite www.mydomain.com-ssl and restarted apache, now certificate was pathed from one path only. I entered back panel of prestashop, enabled Friendly URL, and GREAT images are here AND no more 404 errors on some pages listed in preferences-->seo&url.

That is the solution for me! I hope if someone is running server by himself, just to be sure for that double-crossing of the configuration!

Link to comment
Share on other sites

  • 1 year 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...