Ver Mensaje Individual
  #6 (permalink)  
Antiguo 07/11/2011, 21:11
w0rldart
 
Fecha de Ingreso: junio-2009
Ubicación: Madrid
Mensajes: 402
Antigüedad: 15 años, 6 meses
Puntos: 20
Respuesta: Remover un dato de la url

Este es mi .htaccess:

Código:
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{HTTP_HOST} !^localhost$
    RewriteRule . - [E=REWRITEBASE:/codeigniter-mysite/development/]

    RewriteCond %{HTTP_HOST} !^mysite.com$
    #RewriteRule . - [E=REWRITEBASE:/]
 
    # Removes trailing slashes (prevents SEO duplicate content issues)
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)/$ $1 [L,R=301]

    # Enforce www
    # If you have subdomains, you can add them to
    # the list using the "|" (OR) regex operator
    #OPT1:
    #RewriteCond %{HTTP_HOST} !^(www|subdomain) [NC]
    #RewriteRule ^(.*)$ http://www.plugb.com/$1 [L,R=301]
    #OPT2:
    #   RewriteCond %{HTTPS} !=on
    #   RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
    #   RewriteCond %{HTTP_HOST} (.+)$ [NC]
    #   RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]

    # Enforce NO www
    #OPT1:
    #RewriteCond %{HTTP_HOST} ^www [NC]
    #RewriteRule ^(.*)$ http://domain.tld/$1 [L,R=301]
    #OPT2:
    #RewriteCond %{HTTPS} !=on
    #RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    #RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ %{ENV:REWRITEBASE}index.php?/$1 [L]
    
    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ %{ENV:REWRITEBASE}index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ %{ENV:REWRITEBASE}index.php?/$1 [L]
    #RewriteRule ^(.*)$ %{ENV:REWRITEBASE}fetch?/$1 [L]

</IfModule>
De .htaccess todavia no domino mucho y entonces estos es lo que he ido poniendo junto poco a poco (aunque el fichero .htaccess contiene mucho mas cosas).

Como se dara cuenta esta linea:
Código:
RewriteRule ^(.*)$ %{ENV:REWRITEBASE}index.php?/$1 [L]
me quita el index.php y apartir de esa linea intente esta otra:
Código:
RewriteRule ^(.*)$ %{ENV:REWRITEBASE}fetch?/$1 [L]
Para quitar el /fetch/ pero sin exito.

Algunas otras ideas por favor?

Gracias