Ver Mensaje Individual
  #1 (permalink)  
Antiguo 31/10/2011, 18:37
w0rldart
 
Fecha de Ingreso: junio-2009
Ubicación: Madrid
Mensajes: 402
Antigüedad: 14 años, 11 meses
Puntos: 20
Remover un dato de la url

Buenas amigos, esta vez vengo con una pregunta que trata de codeigniter

Ya tengo la parte del index.php resuelto (quitarlo del url me refiero) y me queda la url asi: www.mysite.com/fetch/category/cars he intentado hacerlo con .htaccess pero no lo he conseguido porque por lo visto entra en conflicto con lo de index.php (a lo mejor lo estoy haciendo mal) Alguna sugerencia?

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

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

    RewriteCond %{HTTP_HOST} !^www.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>