I have a controller named (for example) TheLink, and I can normally access it through mywebsite/index.php/TheLink. Is it possible to make a RewriteRule in htaccess to access it via mywebsite/index.php/The-Link without it redirecting to TheLink? So basically what I want it the URL to say mywebsite/index.php/The-Link (with dash) but use the TheLink controller.
I’ve tried
RewriteRule ^The-Link$ index.php/TheLink
[L]
but that just redirects me to the default CodeIgniter 404 Page
Well, apparently this problem has nothing to do with htaccess and is solved in a completely different way. Solution found here:
Codeigniter Routes regex – using dashes in controller/method names
Edit: Also, a number of different solutions for this, including the one above, found here:
http://ellislab.com/codeigniter/forums/viewthread/124396/