• Admin

    Fai una prova del tipo

    Redirect 301 pagina1 pagina2 e vedi se ti funziona.


  • User

    ciao Juanin, scusa per il ritardo, ma sono sommerso di lavoro.
    Facendo la prova con il redirect 301, mi da: "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error. More information about this error may be available in the server error log."


  • Admin

    Sì ma cosa hai scritto?

    Incollamelo.


  • User

    redirect 301 /pag1.html href="nomedominio.com/cartellaInizio/pag2.html


  • Admin

    Non puoi mettere href=" nel file htaccess

    redirect 301 /index.html http://www.dominio.com/index.html
    

  • User

    provato, non fa niente, se invece provo cosi':

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^.$
    RewriteRule ^(.
    )$ nomedominio.it [R=301,L]

    mi reindirizza tranquillamente su un altro sito


  • Admin

    Ok allora il mod_rewrite funziona.

    A questo punto il tuo problema non è il mod_rewrite 😄


  • User

    ok, mi hai dato una bella e una brutta notizia insieme!
    Quindi, per esclusione, il problema e' di prestashop.
    Hai idea di cosa puo' essere vedendo l'htaccess creato da prestashop? Il problema puo' essere che il file si trovi in una sotto cartella (cartellaInizio), piuttosto che nella root principale? Non so piu' dove mettere mano

    Ho notato che se imposto nel pannello di controllo di prestashop, la funzione per la riscrittura degli url, il file htaccess cambia e rispetto a quello che ti ho postato prima diventa cosi':

    start Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

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

    +++---prestashop.com - +++---prestashop.com/forums

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule . - [E=REWRITEBASE:/cartellaInizio/]
    RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

    Images

    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])(-[_a-zA-Z0-9-])?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])(-[_a-zA-Z0-9-]
    )?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-])?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]
    )?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-])?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]
    )?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[a-zA-Z0-9-])?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]
    )?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^c/([0-9]+)(-[._a-zA-Z0-9-])(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^c/([a-zA-Z
    -]+)(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg

    AlphaImageLoader for IE and fancybox

    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^images_ie/?([^/]+).(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule . - [E=REWRITEBASE:/magasin/]
    RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

    Images

    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])(-[_a-zA-Z0-9-])?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])(-[_a-zA-Z0-9-]
    )?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-])?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]
    )?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-])?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]
    )?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[a-zA-Z0-9-])?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]
    )?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^c/([0-9]+)(-[._a-zA-Z0-9-])(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^c/([a-zA-Z
    -]+)(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg

    AlphaImageLoader for IE and fancybox

    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^images_ie/?([^/]+).(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2

    Dispatcher

    RewriteCond %{REQUEST_FILENAME} -s
    RewriteCond %{REQUEST_FILENAME} -l
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^.$ - [NC,L]
    RewriteCond %{HTTP_HOST} ^---dominio.com$
    RewriteRule ^.
    $ %{ENV:REWRITEBASE}index.php [NC,L]
    </IfModule>

    #If rewrite mod isn't enabled
    ErrorDocument 404 /dominio/index.php?controller=404

    end Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again


  • Admin

    Purtroppo non conosco prestashop mi dispiace.


  • User

    ok, grazie comunque per il tempo che mi hai dedicato. Cerchero' di di scrivere l'eventuale soluzione nel caso dovesse servire a qualcun altro