Foros del Web » Administración de Sistemas » Apache »

rewrite_mod con wamp

Estas en el tema de rewrite_mod con wamp en el foro de Apache en Foros del Web. Hola, bueno creo este tema por que no he encontrado ninguna solución, leí, leí, y busque en miles de sitios, tutoriales para activar el modulo_rewrite, ...
  #1 (permalink)  
Antiguo 28/11/2013, 10:44
Avatar de luzzifer  
Fecha de Ingreso: julio-2009
Ubicación: Paraná - Argentina
Mensajes: 169
Antigüedad: 14 años, 9 meses
Puntos: 3
Sonrisa rewrite_mod con wamp

Hola, bueno creo este tema por que no he encontrado ninguna solución, leí, leí, y busque en miles de sitios, tutoriales para activar el modulo_rewrite, y no he logrado que funcione.

Realmente aparece como activado, pero cuando activo y configuro joomla tiran error las paginas al cargar, pero en la barra de direcciones figuran las url mas cortas y pasa de sin www a con www. pero la pagina no carga tirar error, limpio el cache, rearmo los menú para que tengan nuevos links. Y sigue tirando error.

igual con otra pagina simple solo en html.
aqui el link para que vean el error: http://l2luna.com.ar/stats/

El .htacces de joomla no lo modifico en nada solo mi interes en ese archivo es agregarle la siguiente linea:
Código HTML:
Ver original
  1. RewriteEngine On
  2. RewriteCond %{HTTP_HOST} ^l2luna.com.ar
  3. RewriteRule (.*) http://www.l2luna.com.ar/$1 [R=301,L]

Estas son las imagenes del servidor.



Aquí pueden descargar el archivo httpd.conf para ver como esta.
http://l2luna.com.ar/httpd.conf

La verdad que si alguien sabe del tema, estaria profundamente agradecido, ya que nose que debo estar haciendo mal, o que me estoy olvidando de editar, o configurar, desde ya muchas gracias !!
  #2 (permalink)  
Antiguo 28/11/2013, 11:35
Colaborador
 
Fecha de Ingreso: septiembre-2013
Ubicación: España
Mensajes: 3.648
Antigüedad: 10 años, 8 meses
Puntos: 578
Respuesta: rewrite_mod con wamp

¿Has probado así?

Código Apache:
Ver original
  1. Options +FollowSymLinks
  2. RewriteEngine On
  3. RewriteCond %{HTTP_HOST} ^l2luna.com.ar$
  4. RewriteRule ^(.+)$ http://www.l2luna.com.ar/$1 [R=301,L]
  #3 (permalink)  
Antiguo 28/11/2013, 11:56
Avatar de luzzifer  
Fecha de Ingreso: julio-2009
Ubicación: Paraná - Argentina
Mensajes: 169
Antigüedad: 14 años, 9 meses
Puntos: 3
Respuesta: rewrite_mod con wamp

Hola PHPeros hice el cambio y no funciono tambien, te muestro el .htacces de joomla.
Código HTML:
Ver original
  1. ##
  2. # @package      Joomla
  3. # @copyright    Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.
  4. # @license      GNU General Public License version 2 or later; see LICENSE.txt
  5. ##
  6.  
  7. ##
  8. # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
  9. #
  10. # The line just below this section: 'Options +FollowSymLinks' may cause problems
  11. # with some server configurations.  It is required for use of mod_rewrite, but may already
  12. # be set by your server administrator in a way that dissallows changing it in
  13. # your .htaccess file.  If using it causes your server to error out, comment it out (add # to
  14. # beginning of line), reload your site in your browser and test your sef url's.  If they work,
  15. # it has been set by your server administrator and you do not need it set here.
  16. ##
  17.  
  18. ## Can be commented out if causes errors, see notes above.
  19.  
  20.  
  21. ## Mod_rewrite in use.
  22.  
  23. <IfModule mod_rewrite.c>
  24. Options +FollowSymLinks
  25. RewriteEngine On
  26. RewriteCond %{HTTP_HOST} ^l2luna.com.ar
  27. RewriteRule ^(.+)$ http://www.l2luna.com.ar/$1 [R=301,L]
  28. RewriteBase /
  29.  
  30. # Si el archivo no es un directorio
  31.  
  32. # "Redirigir" normal cualquier numero,letra y barra (-)
  33. # y no hacer nada mas.
  34. RewriteRule ^([A-Za-z0-9-]+)/?$ $1.php [L]
  35.  
  36. # Si la consulta tiene extension .php
  37. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+)\.php\ HTTP
  38.  
  39. # Y no es un directorio
  40. RewriteCond %{REQUEST_URI} !-d
  41.  
  42. # Rediregimos a la misma consulta sin el .php
  43. RewriteRule ^(.+)\.php$ $1 [L,R=302]
  44.  
  45. </IfModule>
  46.  
  47. ## Begin - Rewrite rules to block out some common exploits.
  48. # If you experience problems on your site block out the operations listed below
  49. # This attempts to block the most common type of exploit `attempts` to Joomla!
  50. #
  51. # Block out any script trying to base64_encode data within the URL.
  52. RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
  53. # Block out any script that includes a <script> tag in URL.
  54. RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
  55. # Block out any script trying to set a PHP GLOBALS variable via URL.
  56. RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
  57. # Block out any script trying to modify a _REQUEST variable via URL.
  58. RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
  59. # Return 403 Forbidden header and show the content of the root homepage
  60. RewriteRule .* index.php [F]
  61. #
  62. ## End - Rewrite rules to block out some common exploits.
  63.  
  64. ## Begin - Custom redirects
  65. #
  66. # If you need to redirect some pages, or set a canonical non-www to
  67. # www redirect (or vice versa), place that code here. Ensure those
  68. # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
  69. #
  70. ## End - Custom redirects
  71.  
  72. ##
  73. # Uncomment following line if your webserver's URL
  74. # is not directly related to physical file paths.
  75. # Update Your Joomla! Directory (just / for root).
  76. ##
  77.  
  78. # RewriteBase /
  79.  
  80. ## Begin - Joomla! core SEF Section.
  81. #
  82. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  83. #
  84. # If the requested path and file is not /index.php and the request
  85. # has not already been internally rewritten to the index.php script
  86. RewriteCond %{REQUEST_URI} !^/index\.php
  87. # and the request is for something within the component folder,
  88. # or for the site root, or for an extensionless URL, or the
  89. # requested URL ends with one of the listed extensions
  90. RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
  91. # and the requested path and file doesn't directly match a physical file
  92. RewriteCond %{REQUEST_FILENAME} !-f
  93. # and the requested path and file doesn't directly match a physical folder
  94. RewriteCond %{REQUEST_FILENAME} !-d
  95. # internally rewrite the request to the index.php script
  96. RewriteRule .* index.php [L]
  97. #
  98. ## End - Joomla! core SEF Section.
  #4 (permalink)  
Antiguo 28/11/2013, 11:57
Avatar de luzzifer  
Fecha de Ingreso: julio-2009
Ubicación: Paraná - Argentina
Mensajes: 169
Antigüedad: 14 años, 9 meses
Puntos: 3
Respuesta: rewrite_mod con wamp

Y mira este es el del la pagina simple de html http://l2luna.com.ar/stats/
te comento que yo no los cree a estos .htacces son los que vienen en default en los sitios
Código HTML:
Ver original
  1. <IfModule mod_rewrite.c>
  2.     RewriteEngine On
  3.     RewriteCond %{REQUEST_FILENAME} !-f
  4.     RewriteCond %{REQUEST_FILENAME} !-d
  5.    
  6.     RewriteRule ^([a-zA-Z0-9-/,._;]+) index.php?index=$1 [L]
  7. </IfModule>
  #5 (permalink)  
Antiguo 28/11/2013, 12:50
Colaborador
 
Fecha de Ingreso: septiembre-2013
Ubicación: España
Mensajes: 3.648
Antigüedad: 10 años, 8 meses
Puntos: 578
Respuesta: rewrite_mod con wamp

A ver, dentro de lo poco que sé de Joomla, como cualquier CMS todas las peticiones URL son pasadas al index.php (archivo maestro) mediante parámetros. Por lo tanto si intentas modificar eso te cargarás todo el sistema
Lo mejor es dejarlo como estaba... Ya de por sí es url amigable totalmente preparada.
  #6 (permalink)  
Antiguo 28/11/2013, 13:17
Avatar de luzzifer  
Fecha de Ingreso: julio-2009
Ubicación: Paraná - Argentina
Mensajes: 169
Antigüedad: 14 años, 9 meses
Puntos: 3
Respuesta: rewrite_mod con wamp

Hola de nuevo, gracias por contestar, la verdad que no cambio nada solo hagarro y agrego esas lineas para que sin www dirija a www. Y lo hago siempre con joomla, worpress y otros, y siempre sin ningun problema en hosting, porsupuesto en hosting, con cpanel y quien sabe que sistema, pero en este vps instalando windows server, y wamp, no he logrado hacer lo mismo.
Nunca modifico el .htacces, pero en este caso hice lo que me dijiste, y por la necesidad de que los sitios trabajen bien, ademas joomla no trae algo automatico como para que redirija sin www a www. Lo unico que trae es el formato de url amigables que simplifica las url y las acorta nada mas.

Etiquetas: 301, funcion, html, url, wamp
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 10:30.