Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/12/2019, 18:47
Avatar de oscard41
oscard41
 
Fecha de Ingreso: mayo-2012
Ubicación: Caracas
Mensajes: 288
Antigüedad: 11 años, 11 meses
Puntos: 8
Respuesta: Problemas con Virsualhost redirect

Muchas gracias por tu respuesta, hice la prueba y me funciona en un sitio web que hice desde cero pero en un sitio web hecho en wordpress no me esta funcionando, crees que las reglas que estan en el .htaccess actual me prelen la configuracion que ustd me envio?

asi quedo el .htaccess de la web

Código htaccess:
Ver original
  1. <IfModule mod_rewrite.c>
  2. RewriteEngine On
  3.  
  4. RewriteCond %{HTTPS} =off
  5. RewriteCond %{REQUEST_URI} !^/wp-json/?
  6. RewriteRule (.*) https://%{HTTP_HOST}/$1 [L,R=301]    
  7.  
  8. RewriteCond %{HTTPS} =on
  9. RewriteCond %{REQUEST_URI} ^/wp-json/?
  10. RewriteRule (.*) http://%{HTTP_HOST}/$1 [L,R=301]
  11. </IfModule>
  12.  
  13. <IfModule mod_rewrite.c>
  14. RewriteEngine On
  15. RewriteBase /
  16. RewriteCond %{HTTPS} on [OR]
  17. RewriteCond %{SERVER_PORT} ^443$ [OR]
  18. RewriteCond %{HTTP:X-Forwarded-Proto} https
  19. RewriteRule .* - [E=WPR_SSL:-https]
  20. RewriteCond %{HTTP:Accept-Encoding} gzip
  21. RewriteRule .* - [E=WPR_ENC:_gzip]
  22. RewriteCond %{REQUEST_METHOD} GET
  23. RewriteCond %{QUERY_STRING} =""
  24. RewriteCond %{HTTP:Cookie} !(wordpress_logged_in_.+|wp-postpass_|wptouch_switch_toggle|comment_author_|comment_author_email_) [NC]
  25. RewriteCond %{REQUEST_URI} !^(/(.+/)?feed/?|/(?:.+/)?embed/|/finalizar-compra/(.*)|/carrito/|/mi-cuenta/(.*)|/wc-api/v(.*)|/(index\.php/)?wp\-json(/.*|$))$ [NC]
  26. RewriteCond %{HTTP_USER_AGENT} !^(facebookexternalhit).* [NC]
  27. RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/wp-rocket/%{HTTP_HOST}%{REQUEST_URI}/index%{ENV:WPR_SSL}%{ENV:WPR_WEBP}.html%{ENV:WPR_ENC}" -f
  28. RewriteRule .* "/wp-content/cache/wp-rocket/%{HTTP_HOST}%{REQUEST_URI}/index%{ENV:WPR_SSL}%{ENV:WPR_WEBP}.html%{ENV:WPR_ENC}" [L]
  29.  
  30. </IfModule>
  31. # END WP Rocket
  32. # BEGIN WordPress
  33. <IfModule mod_rewrite.c>
  34. RewriteEngine On
  35. RewriteBase /
  36. RewriteRule ^index\.php$ - [L]
  37. RewriteCond %{REQUEST_FILENAME} !-f
  38. RewriteCond %{REQUEST_FILENAME} !-d
  39. RewriteRule . /index.php [L]
  40. </IfModule>

De ante mano muchas gracias por su respuesta