Jump to content

Redirect All My Domains To One Prestashop = Error


chris2407

Recommended Posts

Hello,

 

totally i have 4 domain names but want that only one main domain will be used and all others will be redirected to this domain. Im doing this with following htaccess code the redirect is working fine for the main page of my prestashop but when i click on any link its not working... there comes a error in my mozilla it says: it seems this page has a endless redirect...

 

im using following htaccess code:

 


<IfModule mod_rewrite.c>
# URL rewriting module activation
RewriteEngine on

#RewriteCond %{HTTP_HOST} !^www.mydomain.de
#RewriteRule ^(.*)$ http://www.mydomain.de/$1 [L,R=301]

# URL rewriting rules
RewriteRule ^api/?(.*)$ /webservice/dispatcher.php?url=$1 [QSA,L]
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/c/$1$2.jpg [L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /category.php?id_category=$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-]*) /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?isolang=$1&id_cms=$2 [QSA,L]
RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?isolang=$1&id_cms_category=$2 [QSA,L]
RewriteRule ^([a-z]{2})/[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$2&isolang=$1 [QSA,L]
RewriteRule ^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$2&isolang=$1 [QSA,L]
RewriteRule ^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]* /category.php?id_category=$2&isolang=$1 [QSA,L]
RewriteRule ^([a-z]{2})/content/([0-9]+)\-[a-zA-Z0-9-]* /cms.php?isolang=$1&id_cms=$2 [QSA,L]
RewriteRule ^([a-z]{2})/content/category/([0-9]+)\-[a-zA-Z0-9-]* /cms.php?isolang=$1&id_cms_category=$2 [QSA,L]
RewriteRule ^([a-z]{2})/([0-9]+)__[a-zA-Z0-9-]* /supplier.php?isolang=$1&id_supplier=$2 [QSA,L]
RewriteRule ^([a-z]{2})/([0-9]+)_[a-zA-Z0-9-]* /manufacturer.php?isolang=$1&id_manufacturer=$2 [QSA,L]
RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html /product.php?id_product=$3&isolang=$1 [QSA,L]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html /product.php?id_product=$2&isolang=$1 [QSA,L]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*) /category.php?id_category=$2&isolang=$1 [QSA,L]
RewriteRule ^en/site-not-found$ /404.php?isolang=en [QSA,L]
RewriteRule ^en/address$ /address.php?isolang=en [QSA,L]
RewriteRule ^en/addresses$ /addresses.php?isolang=en [QSA,L]
RewriteRule ^en/authentication$ /authentication.php?isolang=en [QSA,L]
RewriteRule ^en/cart$ /cart.php?isolang=en [QSA,L]
RewriteRule ^en/Kontakt$ /contact-form.php?isolang=en [QSA,L]
RewriteRule ^en/discount$ /discount.php?isolang=en [QSA,L]
RewriteRule ^en/guest-tracking$ /guest-tracking.php?isolang=en [QSA,L]
RewriteRule ^en/order-history$ /history.php?isolang=en [QSA,L]
RewriteRule ^en/identity$ /identity.php?isolang=en [QSA,L]
RewriteRule ^en/online-shop$ /index.php?isolang=en [QSA,L]
RewriteRule ^en/my-account$ /my-account.php?isolang=en [QSA,L]
RewriteRule ^en/order$ /order.php?isolang=en [QSA,L]
RewriteRule ^en/order-follow$ /order-follow.php?isolang=en [QSA,L]
RewriteRule ^en/quick-order$ /order-opc.php?isolang=en [QSA,L]
RewriteRule ^en/order-slip$ /order-slip.php?isolang=en [QSA,L]
RewriteRule ^en/search$ /search.php?isolang=en [QSA,L]
RewriteRule ^en/stores$ /stores.php?isolang=en [QSA,L]
RewriteRule ^en/([^?&]*) /$1?isolang=en [QSA,L]
RewriteRule ^fr/Cette-page-est-introuvable$ /404.php?isolang=fr [QSA,L]
RewriteRule ^fr/Address$ /address.php?isolang=fr [QSA,L]
RewriteRule ^fr/Addresses$ /addresses.php?isolang=fr [QSA,L]
RewriteRule ^fr/authentification$ /authentication.php?isolang=fr [QSA,L]
RewriteRule ^fr/panier$ /cart.php?isolang=fr [QSA,L]
RewriteRule ^fr/Kontakt$ /contact-form.php?isolang=fr [QSA,L]
RewriteRule ^fr/bons-de-reduction$ /discount.php?isolang=fr [QSA,L]
RewriteRule ^fr/guest-tracking$ /guest-tracking.php?isolang=fr [QSA,L]
RewriteRule ^fr/historique-des-commandes$ /history.php?isolang=fr [QSA,L]
RewriteRule ^fr/identite$ /identity.php?isolang=fr [QSA,L]
RewriteRule ^fr/online-shop$ /index.php?isolang=fr [QSA,L]
RewriteRule ^fr/mon-compte$ /my-account.php?isolang=fr [QSA,L]
RewriteRule ^fr/commande$ /order.php?isolang=fr [QSA,L]
RewriteRule ^fr/details-de-la-commande$ /order-follow.php?isolang=fr [QSA,L]
RewriteRule ^fr/quick-order$ /order-opc.php?isolang=fr [QSA,L]
RewriteRule ^fr/avoirs$ /order-slip.php?isolang=fr [QSA,L]
RewriteRule ^fr/recherche$ /search.php?isolang=fr [QSA,L]
RewriteRule ^fr/magasins$ /stores.php?isolang=fr [QSA,L]
RewriteRule ^fr/([^?&]*) /$1?isolang=fr [QSA,L]
RewriteRule ^de/Seite-nicht-gefunden$ /404.php?isolang=de [QSA,L]
RewriteRule ^de/Adresse$ /address.php?isolang=de [QSA,L]
RewriteRule ^de/Adressen$ /addresses.php?isolang=de [QSA,L]
RewriteRule ^de/Anmeldung-Benutzerkonto$ /authentication.php?isolang=de [QSA,L]
RewriteRule ^de/Warenkorb$ /order-opc.php?isolang=de [QSA,L]
RewriteRule ^de/Kontakt$ /contact-form.php?isolang=de [QSA,L]
RewriteRule ^de/Rabatt$ /discount.php?isolang=de [QSA,L]
RewriteRule ^de/guest-tracking$ /guest-tracking.php?isolang=de [QSA,L]
RewriteRule ^de/Bestell-Historie$ /history.php?isolang=de [QSA,L]
RewriteRule ^de/Identitaet$ /identity.php?isolang=de [QSA,L]
RewriteRule ^de/online-shop$ /index.php?isolang=de [QSA,L]
RewriteRule ^de/mein-kundenkonto$ /my-account.php?isolang=de [QSA,L]
RewriteRule ^de/Bestelluebersicht$ /order-follow.php?isolang=de [QSA,L]
RewriteRule ^de/Auftragsbestaetigung$ /order-slip.php?isolang=de [QSA,L]
RewriteRule ^de/suche$ /search.php?isolang=de [QSA,L]
RewriteRule ^de/Shops$ /stores.php?isolang=de [QSA,L]
RewriteRule ^de/([^?&]*) /$1?isolang=de [QSA,L]
RewriteRule ^es/site-not-found$ /404.php?isolang=es [QSA,L]
RewriteRule ^es/Address$ /address.php?isolang=es [QSA,L]
RewriteRule ^es/Addresses$ /addresses.php?isolang=es [QSA,L]
RewriteRule ^es/Anmeldung$ /authentication.php?isolang=es [QSA,L]
RewriteRule ^es/Warenkorb$ /cart.php?isolang=es [QSA,L]
RewriteRule ^es/Kontakt$ /contact-form.php?isolang=es [QSA,L]
RewriteRule ^es/Rabatt$ /discount.php?isolang=es [QSA,L]
RewriteRule ^es/guest-tracking$ /guest-tracking.php?isolang=es [QSA,L]
RewriteRule ^es/Historial-de-pedidos$ /history.php?isolang=es [QSA,L]
RewriteRule ^es/Identidad$ /identity.php?isolang=es [QSA,L]
RewriteRule ^es/online-shop$ /index.php?isolang=es [QSA,L]
RewriteRule ^es/Mi-Cuenta$ /my-account.php?isolang=es [QSA,L]
RewriteRule ^es/Carrito$ /order.php?isolang=es [QSA,L]
RewriteRule ^es/devolucion-de-productos$ /order-follow.php?isolang=es [QSA,L]
RewriteRule ^es/quick-order$ /order-opc.php?isolang=es [QSA,L]
RewriteRule ^es/Vales$ /order-slip.php?isolang=es [QSA,L]
RewriteRule ^es/suche$ /search.php?isolang=es [QSA,L]
RewriteRule ^es/Tiendas$ /stores.php?isolang=es [QSA,L]
RewriteRule ^es/([^?&]*) /$1?isolang=es [QSA,L]
RewriteRule ^it/site-not-found2$ /404.php?isolang=it [QSA,L]
RewriteRule ^it/Adresse$ /address.php?isolang=it [QSA,L]
RewriteRule ^it/Addresses$ /addresses.php?isolang=it [QSA,L]
RewriteRule ^it/Authentification$ /authentication.php?isolang=it [QSA,L]
RewriteRule ^it/Warenkorb$ /cart.php?isolang=it [QSA,L]
RewriteRule ^it/Kontakt$ /contact-form.php?isolang=it [QSA,L]
RewriteRule ^it/Rabatt$ /discount.php?isolang=it [QSA,L]
RewriteRule ^it/guest-tracking$ /guest-tracking.php?isolang=it [QSA,L]
RewriteRule ^it/order-history$ /history.php?isolang=it [QSA,L]
RewriteRule ^it/Identitaet$ /identity.php?isolang=it [QSA,L]
RewriteRule ^it/online-shop$ /index.php?isolang=it [QSA,L]
RewriteRule ^it/my-account$ /my-account.php?isolang=it [QSA,L]
RewriteRule ^it/Bestellung$ /order.php?isolang=it [QSA,L]
RewriteRule ^it/Bestelluebersicht$ /order-follow.php?isolang=it [QSA,L]
RewriteRule ^it/quick-order$ /order-opc.php?isolang=it [QSA,L]
RewriteRule ^it/Auftragsbestaetigung$ /order-slip.php?isolang=it [QSA,L]
RewriteRule ^it/suche$ /search.php?isolang=it [QSA,L]
RewriteRule ^it/Shops$ /stores.php?isolang=it [QSA,L]
RewriteRule ^it/([^?&]*) /$1?isolang=it [QSA,L]
</IfModule>

# Catch 404 errors
ErrorDocument 404 /404.php

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
</IfModule>

FileETag INode MTime Size
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>


 

I could send you my real domain name in PM so you could check it. Is there any error in my htaccess file or what is wrong?

 

Somebody told me that this error is normal and is happening because it is necessary to reconfigure prestashop for this. Problems happen due try to use same shop through other domain. Prestashop is configured as mydomain.de and generates links starting with mydomain.de

 

Can anybody please help me with this and tell me a solution or any advise? i would highly appreciate it.

 

many thanks

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