elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Como proteger una cartera - billetera de Bitcoin


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web (Moderador: #!drvy)
| | |-+  Ayuda con mod_rewrite
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Ayuda con mod_rewrite  (Leído 1,243 veces)
[u]nsigned


Desconectado Desconectado

Mensajes: 2.397

JS/Node developer


Ver Perfil WWW
Ayuda con mod_rewrite
« en: 14 Mayo 2013, 18:10 pm »

Hola, tengo un sitio web donde tengo un joomla en la raiz de www, en un hosting(shared) con linux. Tengo el archivo .htaccess de la siguiente forma:

Código
  1. # @version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $
  2. # @package Joomla
  3. # @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
  4. # @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
  5. # Joomla! is Free Software
  6. ##
  7.  
  8. #####################################################
  9. #  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
  10. #
  11. # The line just below this section: 'Options +FollowSymLinks' may cause problems
  12. # with some server configurations.  It is required for use of mod_rewrite, but may already
  13. # be set by your server administrator in a way that dissallows changing it in
  14. # your .htaccess file.  If using it causes your server to error out, comment it out (add # to
  15. # beginning of line), reload your site in your browser and test your sef url's.  If they work,
  16. # it has been set by your server administrator and you do not need it set here.
  17. #
  18. #####################################################
  19.  
  20. ##  Can be commented out if causes errors, see notes above.
  21. Options +FollowSymLinks
  22.  
  23. #
  24. #  mod_rewrite in use
  25.  
  26. RewriteEngine On
  27.  
  28. ########## Begin - Rewrite rules to block out some common exploits
  29. ## If you experience problems on your site block out the operations listed below
  30. ## This attempts to block the most common type of exploit `attempts` to Joomla!
  31. #
  32. # Block out any script trying to set a mosConfig value through the URL
  33. RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
  34. # Block out any script trying to base64_encode crap to send via URL
  35. RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
  36. # Block out any script that includes a <script> tag in URL
  37. RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
  38. # Block out any script trying to set a PHP GLOBALS variable via URL
  39. RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
  40. # Block out any script trying to modify a _REQUEST variable via URL
  41. RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
  42.  
  43. # Send all blocked request to homepage with 403 Forbidden error!
  44. RewriteRule ^(.*)$ index.php [F,L]
  45. #
  46. ########## End - Rewrite rules to block out some common exploits
  47.  
  48. #  Uncomment following line if your webserver's URL
  49. #  is not directly related to physical file paths.
  50. #  Update Your Joomla! Directory (just / for root)
  51.  
  52. # RewriteBase /
  53.  
  54. ########## Begin - Joomla! core SEF Section
  55. #
  56. RewriteCond %{REQUEST_FILENAME} !-f
  57. RewriteCond %{REQUEST_FILENAME} !-d
  58. RewriteCond %{REQUEST_URI} !^/index.php
  59. RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
  60. RewriteRule (.*) index.php
  61. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
  62. #
  63. ########## End - Joomla! core SEF Section
  64. ##Securyty Mods
  65. RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
  66. RewriteCond %{HTTP_USER_AGENT} ^(-|\.|') [OR]
  67. RewriteCond %{HTTP_USER_AGENT} ^(.*)(<|>|%3C|%3E)(.*) [NC,OR]
  68. RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget)(.*) [NC,OR]
  69. RewriteCond %{HTTP_USER_AGENT} ^(.*)(libwww-perl|libwwwperl|snoopy|curl|wget|winhttp|python|nikto|scan|clshttp|archiver|loader|email|harvest|fetch|extract|grab|miner|suck|reaper|leach)(.*) [NC,OR]
  70. RewriteCond %{REQUEST_URI} ^(/,|/;|/<|/>|/'|/`|/%2C|/%3C|/%3E|/%27|/////) [NC,OR]
  71. RewriteCond %{HTTP_REFERER} ^(.*)(%00|%08|%09|%0A|%0B|%0C|%0D|%0E|%0F|%2C|<|>|'|%3C|%3E|%26%23|%27|%60)(.*) [NC,OR]
  72. RewriteCond %{QUERY_STRING} ^(.*)(%00|%08|%09|%0A|%0B|%0C|%0D|%0E|%0F|%2C|%3C|%3E|%27|%26%23|%60)(.*) [NC,OR]
  73. RewriteCond %{QUERY_STRING} ^(.*)('|-|<|>|,|/|\\|\.a|\.c|\.t|\.d|\.p|\.i|\.e|\.j)(.*) [NC,OR]
  74. RewriteCond %{HTTP_COOKIE} ^(.*)(<|>|'|%3C|%3E|%27)(.*) [NC]

El problema es que yo cree el directorio /www/vota dentro del ost, pero si entro a midominio.com/vota me sigue redireccionando al index...asi que me preguntaba que tipo de RewriteCond deberia agregar para evitar que me redireccione eso?

Saludos y muchas gracias por leer!


En línea

No hay atajo ante la duda, el misterio se hace aquí...
Se hace carne en cada uno, el misterio es existir!
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines