• RewriteRules with Prestashop and Drupal

    From marquopolo@gmail.com@21:1/5 to All on Wed Mar 1 18:09:45 2017
    Hello,
    2 separate needs for 2 web sites...

    1) a prestashop 1.6 catalog. The owner asked to change the domain name of the site but wanted to keed the old you for legacy purpose... so www.olddomain.com became www.newdomain.com We did a rewriterules :

    RewriteRule ^(.+)/$ http://www.newdomain.com/$1 [R=permanent]

    This is working fine when typing "www.olddomain.com" it is converting to "www.newdomain.com" but if we try to access a specific link: "www.olddomain.com/index.php" this is what we get: "www.newdomain.comindex.php"
    and of course, error. The / is missing. I tried several version :
    ^/(.+)$
    ^(.*)/$
    ^(.+)$

    always the same results! No / after the .com

    We use a vhost.conf file for all web site... There is also a .htaccess in the root of the prestashop website. Is there a conflict? This should be simple... changing a domain for another one. Any help?

    2) a drupal website that needs to redirect all sub-domains and extention to one domain. In this second case, it's the opposite problem! With the same rewrite rule syntax, we end up with // (2 slash)

    So "dev.mydomain.com" or "www.mydomain.ca" should redirect to "www.mydomain.com" but we have : "www.mydomain.com//"

    Of course, Drupal also was a .htaccess file at root level. My vhost.conf file is were I put my global site config including the rewriterules.

    Hope somebody can resolve these 2 problems! Thanks.
    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)