Welcome Guest, Not a member yet? Register   Sign In
Remove /auth/ from url?
#1

[eluser]oo00_Mr_K_00oo[/eluser]
Hey there

I'm using the lovely DX_Auth in my app to look after login etc

It's working really well ... and it's a great bit of code.

I want to tailor my app though ... DX_Auth uses two url slugs to drive sections of it.

index.php/auth/login/ or index.php/auth/register/

and for backend stufff (by default) it's
index.php/backend/users/

Of course I've changed the /backend/ bit to something less well known for my admin stuff ...

But I want to dump the /auth/ altogether for the users

Of course I have .htaccess for ripping out the index.php - but my .htaccess skills are ... well... crap

I basically want to have
www.mydomain.com/login/ ... point to www.mydomain.com/index.php/auth/login/

I want to then be able to do
www.mydomain.com/username ... and use the username variable out of the url .. just like twitter's www.twitter.com/oo00_Mr_K_00oo etc

Thoughts?

I did try this:
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #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 ^(.*)$ /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
    
    
    #specific rules now
    
    RewriteRule ^/login/(.*)$ index.php/auth/login/$1 [L]
    RewriteRule ^(.*)$ index.php?/$1 [L]
    
</IfModule>


Messages In This Thread
Remove /auth/ from url? - by El Forum - 05-15-2009, 10:58 PM
Remove /auth/ from url? - by El Forum - 05-16-2009, 01:17 AM
Remove /auth/ from url? - by El Forum - 05-16-2009, 03:01 AM
Remove /auth/ from url? - by El Forum - 05-16-2009, 03:35 AM
Remove /auth/ from url? - by El Forum - 05-16-2009, 09:24 PM
Remove /auth/ from url? - by El Forum - 05-17-2009, 05:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB