neodark2 Posted November 18, 2010 Share Posted November 18, 2010 Buenos días, tengo problemas con que prestashop me muestre su página de error personalizada 404.php, mi sitio está en el directorio raiz osea http://www.misitio.com y en el .htaccess tengo:----------------------------------# Para que al poner el dominio sin las www aparezca con las wwwRewriteEngine OnRewriteCond %{HTTP_HOST} !^www\.MIPAGINA\.com [NC]RewriteRule ^(.*)$ http://www.MIPAGINA.com/$1 [R=301,L]# Reglas para que expiren las imagenesHeader set Expires "Thu, 15 Apr 2012 20:00:00 GMT"Header unset ETagFileETag None# Reglas para compresion de la paginaSetOutputFilter DEFLATE AddEncoding x-compress .ZAddEncoding x-gzip .gz .tgzAddType application/x-compress .ZAddType application/x-gzip .gz .tgzAddOutputFilterByType DEFLATE text/php text/HTML text/txt# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution# http://www.prestashop.com - http://www.prestashop.com/forums# URL rewriting module activationRewriteEngine on# URL rewriting rulesRewriteRule ^([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 errorsErrorDocument 404 /404.php--------------------------------------y no me muestra la página personalizada, si intento entrar directamente por: http://www.MIPAGINA.com/404.php me tira también un error 500 algo así como:---------------Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log.Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.------------------------Y si intento abrir un enlace que no existe tipo http://www.MIPAGINA.com/asdfasfas me dice algo como:---------------Not FoundThe requested URL /asfasfasfas was not found on this server.Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.-------------------Tarda un poquito más en dar éste errorTengo prestashop 1.3.2 y las url amigables, si alguien me puede echar una mano, lo agradeceríaUn saludo Link to comment Share on other sites More sharing options...
neodark2 Posted November 18, 2010 Author Share Posted November 18, 2010 Nadie sabe la solución?? el hosting es piensasolutions y no paran de darme capotazos que si ellos no dan soporte a programación, que si vea la configuración del php y si quiero cambiar algo que se lo diga, que si me lea el manual de apache...Increible Link to comment Share on other sites More sharing options...
4webs.es Posted November 19, 2010 Share Posted November 19, 2010 Prueba a poner esto:# Error PagesErrorDocument 404 404.phpY nos cuentas... Link to comment Share on other sites More sharing options...
neodark2 Posted November 19, 2010 Author Share Posted November 19, 2010 Buenos días 4webs.es he probado lo que me has dicho y lo que ocurre ahora es que cuando intento abrir una página inexistente me sale una página en blanco y pone arriba: 404.phpEso puede ser cara al servidor del apache?? o del php?? es que no es normal, no??? Link to comment Share on other sites More sharing options...
4webs.es Posted November 19, 2010 Share Posted November 19, 2010 Has probado a bajarte el archivo 404.php a ver si contiene algo? si ya no te sale el internal error, ya casi lo tienes , revisa tu php que el error está ahí.Suerte!!! Link to comment Share on other sites More sharing options...
neodark2 Posted November 19, 2010 Author Share Posted November 19, 2010 Éste es el contenido de 404.php<?phpif (in_array(substr($_SERVER['REQUEST_URI'], -3), array('png', 'jpg', 'gif'))){ include(dirname(__FILE__).'/config/settings.inc.php'); header('Location: '.__PS_BASE_URI__.'img/404.gif'); exit;}include(dirname(__FILE__).'/config/config.inc.php');include(dirname(__FILE__).'/header.php');/* Send the proper status code in HTTP headers */header('HTTP/1.1 404 Not Found');header('Status: 404 Not Found');$smarty->display(_PS_THEME_DIR_.'404.tpl');include(dirname(__FILE__).'/footer.php');?> Link to comment Share on other sites More sharing options...
Recommended Posts