Welcome Guest, Not a member yet? Register   Sign In
Routes and hashed URLs
#1

I started a projected and noticed that it was getting rather large, so I decided I needed to go to a framework like CI.  So I just set up a new site and I'm setting up the basic functionality but one of the important things about my site is the URLS.  Here's an example:

http://ffbeben.ch/6mqv4mi6wtilgjdgxrgjdg...dgxrgjdgxr

So if you use this URL, and you click on the Head slot and pick an item, the URL will reload to something like this:

http://ffbeben.ch/6mqv4mi6wtilgjdgxr6nyl...dgxrgjdgxr

The reason for this is I want people to be able to build a unit, and then copy and paste the URL to share with other people.

I accomplished this by doing this in the .htaccess

Code:
RewriteEngine On

RewriteCond %{REQUEST_URI} !^/assets
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f



RewriteRule ^(\w+)$ ./index.php?$1

Now moving to CI, I'm a bit at a loss as how to accomplish the same thing.  I've tinkered around with trying to use the same regex in the routes file but I'm not having a whole lot of luck.  Everything I try just results in a 404.

Any advice or guidance would be appreciated.
Reply


Messages In This Thread
Routes and hashed URLs - by wirikidor - 11-21-2017, 05:11 PM
RE: Routes and hashed URLs - by InsiteFX - 11-22-2017, 04:32 AM
RE: Routes and hashed URLs - by wirikidor - 11-22-2017, 08:18 AM
RE: Routes and hashed URLs - by Narf - 11-22-2017, 09:23 AM
RE: Routes and hashed URLs - by wirikidor - 11-22-2017, 09:59 AM
RE: Routes and hashed URLs - by jreklund - 11-22-2017, 05:24 AM
RE: Routes and hashed URLs - by wirikidor - 11-23-2017, 04:02 PM
RE: Routes and hashed URLs - by Narf - 11-22-2017, 11:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB