2011-12-21 26 views
13

Actualmente estoy configurando un sitio web de un cliente en su cuenta de hosting. La dirección del sitio web y, por alguna razón, no se predetermina a los archivos .php (es decir: index.php). Si pongo index.php y no hay un archivo index.html recibo el siguiente error:¿Cómo configurar la página web predeterminada a través de htaccess?

If you feel you have reached this page in error, please contact the web site owner: [email protected] If you are the web site owner, it is possible you have reached this page because: The IP address has changed. There has been a server misconfiguration. The site may have been moved to a different server. If you are the owner of this website and were not expecting to see this page, please contact your hosting provider.

Su alojamiento es un alojamiento compartido en cpanel.

Respuesta

24

Utilice la directiva DirectoryIndex en su archivo .htaccess

DirectoryIndex index.php 
2

Trate

DirectoryIndex index.php 

si eso no funciona, puede que tenga que trabajar alrededor de ella, proporcionando index.html como

<html><frameset rows="*"><frame src="index.php"></frameset></html> 

(ofcourse más elaborado)

+0

Si ya sugiere una solución de ese tipo, el uso de marcos es absolutamente inútil: simplemente configure la redirección con la etiqueta '' correspondiente. –

3

¡El problema fue causado por el caché de mi navegador web, tan pronto como borré mi caché, funcionó!

Cuestiones relacionadas