Welcome Guest, Not a member yet? Register   Sign In
URL Manipulation
#2

[eluser]Glen Swinfield[/eluser]
First you need to use .htaccess to remove the index.php then config/routes.php to deal with the routing of the page - something like this:

.htaccess:
Code:
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    
    RewriteCond $1 !^(index\.php|images|css|robots\.txt|favicon\.ico)
    RewriteRule ^(.*)$ index.php/$1 [L,QSA]
    RewriteRule /favicon\.ico /images/favicon.ico [L]

    SetEnv mod_rewrite_enabled 1
</IfModule>


<IfModule !mod_rewrite.c>
    SetEnv mod_rewrite_enabled 0
</IfModule>


Routes:
Code:
$route[':any'] = "admin/view";

Put any routes after the default ones - And I'm not sure if this will work anyway - you may have to use
Code:
$route['view/:any'] = "admin/view";

and have the url http://www.site.com/view/entryname

Check the user manual for routing.


Messages In This Thread
URL Manipulation - by El Forum - 07-11-2007, 08:38 AM
URL Manipulation - by El Forum - 07-11-2007, 09:55 AM
URL Manipulation - by El Forum - 07-11-2007, 10:31 AM
URL Manipulation - by El Forum - 07-11-2007, 08:18 PM
URL Manipulation - by El Forum - 07-12-2007, 03:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB