Jump to content

Pagina error personalizada 404.php prestashop


Recommended Posts

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 www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.MIPAGINA\.com [NC]
RewriteRule ^(.*)$ http://www.MIPAGINA.com/$1 [R=301,L]

# Reglas para que expiren las imagenes

Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT"
Header unset ETag
FileETag None


# Reglas para compresion de la pagina
SetOutputFilter DEFLATE
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddOutputFilterByType 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 activation
RewriteEngine on

# 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 [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 errors
ErrorDocument 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 Error

The 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 Found

The 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 error

Tengo prestashop 1.3.2 y las url amigables, si alguien me puede echar una mano, lo agradecería

Un saludo

Link to comment
Share on other sites

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

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

Eso puede ser cara al servidor del apache?? o del php?? es que no es normal, no???

Link to comment
Share on other sites

Éste es el contenido de 404.php

<?php

if (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

Guest
This topic is now closed to further replies.
×
×
  • Create New...