Hola,
TEngo las redirecciones que indico abajo. En mi ordenador funcionan correctamente pero en 000webhost no.
La url
www.lsri8088.com/home.html, debería redireccionar en primer lugar a /home/home.html, luego a public/home/home.html, y finalmente cambiar .html por .php.
¿Que puede estar mal? ¿Porque no funciona en este servidor?
Gracias
Code:
# by webhosts
# Do not remove this line, otherwise mod_rewrite rules will stop working
RewriteBase /public
Options +FollowSymlinks
# indica la página a mostrar como indice del directorio, si no existe, muestra el listado del directorio (archivos y carpetas)
# comprueba la existencia de las páginas en el orden indicadas
<IfModule dir_module>
DirectoryIndex home.php /public_html/e404.php
</IfModule>
#Deshabilita mostar el directorio
Options -Indexes
ErrorDocument 404 /e404.html
# ****************** PHP **********************
php_flag display_errors on
php_value auto_prepend_file "/home/<MY_USER>/public_html/private/common/init.php"
# *********************************************
# ************** REWRITE *****************************
# ACCESS FORBIDDEN
RewriteCond %{REQUEST_URI} ^/private/(.*)$
RewriteRule ^(.*)$ - [R=404]
# go home
RewriteCond %{REQUEST_URI} ^/$|^/home.html$
RewriteRule ^(.*)$ /home/home.html
# go home of folder
RewriteCond %{REQUEST_URI} ^(.*)/$
RewriteRule ^(.*)$ $1/home.html
RewriteCond %{REQUEST_URI} ^/nacimientos/(.*)$
RewriteRule ^nacimientos/(.*)/(.*)/fotos.html$ /public/nacimientos/fotosIndex.php?belenYear=$1&belenType=$2 [L]
# documment root of URI to /public/
RewriteCond %{REQUEST_URI} !^/public/(.*)$
RewriteRule (.*) /public/$1 [P,L]
# .html to .php
RewriteRule ^(.*)\.html$ $1.php [NC]