Advertisement
sergio_educacionit

mod_rewrite 404

Aug 1st, 2024
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <VirtualHost *:80>
  2. ServerAdmin webmaster@localhost
  3. DocumentRoot /var/www/html
  4.  
  5. # Usar mod_rewrite para redirigir a la página de error
  6. RewriteEngine On
  7. RewriteCond %{HTTP_HOST} !^(localhost|127\.0\.0\.1)$ [NC]
  8. RewriteRule ^(.*)$ /var/www/html/host_no_encontrado.html [L,R=404]
  9.  
  10. # Registro de errores
  11. ErrorLog ${APACHE_LOG_DIR}/error.log
  12. CustomLog ${APACHE_LOG_DIR}/access.log combined
  13. </VirtualHost>
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement