Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14346

Routes and hashed URLs

$
0
0
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.

Viewing all articles
Browse latest Browse all 14346

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>