![]() |
Quick .htaccess question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Quick .htaccess question (/showthread.php?tid=22618) |
Quick .htaccess question - El Forum - 09-15-2009 [eluser]coding_hero[/eluser] Hi all. I have a quick .htaccess question. I know regex, but I still have problems writing an .htaccess file. Here's what's on my site right now: Code: RewriteEngine on I'd like to add the ability for the user to go to http://<domainname>.com/<post_id> and arrive at http://<domainname>.com/search/post/<post_id>. So, basically, I just need to capture any ([0-9]+) after the /, and redirect to /search/post/$1 (and still hide the index.php). I'm sending links as text messages, and every character helps. Thanks! Quick .htaccess question - El Forum - 09-15-2009 [eluser]Dam1an[/eluser] Wouldn't it be easier to do this using CI routes? Lookup URI routing in the userguide for how it works Quick .htaccess question - El Forum - 09-15-2009 [eluser]coding_hero[/eluser] Forgot all about those. That worked great, thanks! |