+ Reply to Thread
Results 1 to 4 of 4

Thread: URL Amigable no me va

  1. #1
    sergiodavidnavarro24 is offline x10Hosting Member sergiodavidnavarro24 is an unknown quantity at this point
    Join Date
    Feb 2011
    Posts
    2

    URL Amigable no me va

    Hola, tengo este codigo:

    .htaccess

    Code:
    RewriteEngine on
    
    
    RewriteCond %{HTTP_HOST} ^midominio\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.midominio\.com$
    RewriteRule ^/?$ "http\:\/\/www\.midominio\.com\/index\.html" [R=301,L]
    le añado la linea:
    Code:
    RewriteRule ^(.*)$ $1.html [L,QSA]
    y le quito el .html en la otra linea pero no va, que hago mal?

  2. #2
    paneo's Avatar
    paneo is offline x10 Sophmore paneo is an unknown quantity at this point
    Join Date
    Apr 2010
    Location
    Uruguay
    Posts
    216

    Re: URL Amigable no me va

    ¿Vos querés que no aparezca la terminación del archivo?
    Quiero que conozcas mi banda: bandaTorpes.com (alojamiento DNS en x10)

  3. #3
    sergiodavidnavarro24 is offline x10Hosting Member sergiodavidnavarro24 is an unknown quantity at this point
    Join Date
    Feb 2011
    Posts
    2

    Re: URL Amigable no me va

    Exactamente, lo que deseo es que no salga la terminacion .html en el navegador

  4. #4
    esevece is offline x10Hosting Member esevece is an unknown quantity at this point
    Join Date
    Feb 2012
    Location
    Uruguay
    Posts
    2

    Re: URL Amigable no me va

    Soy el ex-paneo...
    encontré algo para probar:

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.html -f
    RewriteRule ^([^/]+)/$ $1.html


    # Agregando lo siguiente también te agrega una / al final.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
    RewriteRule (.*)$ /$1/ [R=301,L]

    Fuente: http://eisabainyo.net/weblog/2007/08...-via-htaccess/

+ Reply to Thread

Similar Threads

  1. URL Amigable
    By staff66 in forum General
    Replies: 1
    Last Post: 06-25-2011, 06:21 AM
  2. htaccess url amigable a buscadores
    By rubencit in forum Tutoriales
    Replies: 6
    Last Post: 10-28-2010, 06:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers