Buenas,
Acabo de subir la web a un entorno de pruebas, para poder enseñaros mejor los errores que produce.
http://www.webmodular.neodani.com/ Código index.php
Código PHP:
Ver original<?php
/* DISEÑO MODULAR */
include_once( $_SERVER [ 'DOCUMENT_ROOT' ]. '/includes/metatags.php' );
include_once( $_SERVER [ 'DOCUMENT_ROOT' ]. '/includes/header.php' );
$id=$_GET['pagina'];
switch ($id) {
case 'inicio':
include("pages/inicio.php");
break;
case 'faq':
include("pages/ayuda/faq.php");
break;
case 'soporte':
include("pages/ayuda/soporte.php");
break;
case 'servicios':
include("pages/servicios.php");
break;
case 'directorio':
$apartado=$_GET['apartado'];
switch ($apartado) {
case 'futbol':
include("pages/directorio/futbol.php");
break;
case 'tenis':
include("pages/directorio/tenis.php");
break;
default:
include("pages/404.php");
};
break;
default:
include("pages/404.php");
}
?>
<p><a href="http://www.webmodular.neodani.com/faq">FAQ</a></p>
<p><a href="http://www.webmodular.neodani.com/soporte">SOPORTE</a></p>
<p><a href="http://www.webmodular.neodani.com/directorio/futbol">FUTBOL</a></p>
<p><a href="http://www.webmodular.neodani.com/directorio/tenis">TENIS</a></p>
</div>
Fichero .htaccess
Código Apache:
Ver original# Proteger fichero htaccess
<Files .htaccess>
order allow,deny
deny from all
</Files>
#Evitar que listen el contenido de las carpetas
Options -Indexes
RewriteEngine on
# WWW al dominio
RewriteCond %{HTTP_HOST} !^www\.webmodular.neodani\.com$
RewriteRule (.*) http://www.webmodular.neodani.com/$1 [R=301,L]
# Barra final a la direccion
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule (.*) http://www.webmodular.neodani.com/$1/ [L,R=301]
# WEB MODULAR
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)/?(.*)?$ index.php?pagina=$1&apartado=$2 [NC,L]
RewriteRule ^.*$ pages/404.php [NC,L]
# PRUEBAS COMENTADAS
#########################################################
#RewriteRule ^faq/$ /index.php?pagina=faq [L]
#RewriteRule ^soporte/$ /index.php?pagina=soporte [L]
#RewriteRule ^nosotros/$ /index.php?pagina=nosotros [L]
##########################################################
#Consigue usar la version 5 de php en lugar de la 4
AddHandler application/x-httpd-php5 .php .php4 .php3 .phtml
#Compresion de archivos
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
BIEN. Cuando escribes el dominio sin www te lo redirige al www
http://webmodular.neodani.com MAL. No carga la pagina de inicio cuando se entra a la web
BIEN. Si accedes a las FAQ te pone la barra al final aunque no la pongas, y lo mismo que sin www, te las añade y te pone la barra al final
http://www.webmodular.neodani.com/faq http://webmodular.neodani.com/faq/ MAL. Las paginas que estan en el switch interior (segundo nivel) no las carga
http://www.webmodular.neodani.com/directorio/futbol http://www.webmodular.neodani.com/directorio/tenis MAL. Las hojas de estilo tampoco las carga, ni poniendo en la cabecera
<base href="www.webmodular.neodani.com" />
Podéis ayudarme? ando bastante perdido
Muchas gracias de antemano!