Foros del Web » Programando para Internet » PHP »

[SOLUCIONADO] URLs Amigables .htacess vs web.config

Estas en el tema de URLs Amigables .htacess vs web.config en el foro de PHP en Foros del Web. Hola!! Vengo nuevamente con una consulta. Siempre usé servicios de hosting con Linux y para gestionar las urls amigables uso el ".htacces" con estas directrices: ...
  #1 (permalink)  
Antiguo 30/06/2014, 09:21
 
Fecha de Ingreso: noviembre-2010
Mensajes: 63
Antigüedad: 13 años, 5 meses
Puntos: 3
URLs Amigables .htacess vs web.config

Hola!!

Vengo nuevamente con una consulta.

Siempre usé servicios de hosting con Linux y para gestionar las urls amigables uso el ".htacces" con estas directrices:

RewriteEngine On
AddDefaultCharset ISO-8859-1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?s=$1 [L,QSA]


El problema que tengoes que caí en un hosting que tiene como sistema operativo Windows y me dicen que el equivalente a .htacces en ese entorno es "web.config".
La verdad que no tengo idea de como usarlo.

¿Me podrían ayudar con el equivalente a esas directrices para web.config?

Mil gracias!!
  #2 (permalink)  
Antiguo 30/06/2014, 09:27
Avatar de Italico76  
Fecha de Ingreso: abril-2007
Mensajes: 3.303
Antigüedad: 17 años, 1 mes
Puntos: 292
Respuesta: URLs Amigables .htacess vs web.config

Prueba a ver su este conversor te funciona:

http://cbsa.com.br/tools/online-conv...eb-config.aspx
__________________
Salu2!
  #3 (permalink)  
Antiguo 30/06/2014, 09:33
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: URLs Amigables .htacess vs web.config

Ambos temas nada tienen que ver con programación en PHP.

La configuración .htacces y/o web.config le corresponde al servidor únicamente.
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #4 (permalink)  
Antiguo 01/07/2014, 07:00
 
Fecha de Ingreso: noviembre-2010
Mensajes: 63
Antigüedad: 13 años, 5 meses
Puntos: 3
Respuesta: URLs Amigables .htacess vs web.config

Resuleto!!

No si si es la manera correcta pero funciona!

Gracias por su tiempo!

<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/index.php?s={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
  #5 (permalink)  
Antiguo 17/04/2015, 09:55
 
Fecha de Ingreso: marzo-2015
Mensajes: 1
Antigüedad: 9 años, 1 mes
Puntos: 0
Respuesta: URLs Amigables .htacess vs web.config

Cita:
Resuleto!!

No si si es la manera correcta pero funciona!

Gracias por su tiempo!

<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/index.php?s={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Fenomenal, soy nuevo en esto y todo me cuesta entender :) llevaba 1 semana sin poder hacer funcionar el archivo web.config en mi Hosting de godaddy, siempre me salía un error 500, con esto pude solucionarlo y Especificar caché de navegador con el el sgt código
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="90.00:00:00" />
</staticContent>

Saludos Cordiales

Etiquetas: .htacces, permalinks, url
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 13:28.