mapping routes - 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: mapping routes (/showthread.php?tid=11797) |
mapping routes - El Forum - 09-23-2008 [eluser]paulcj2[/eluser] my application allows many sites to work off the same database. the url for a specific site includes the site name as the second segment. Here is a sample url: http://www.elsakfiberarts.com/page/elsakfiberarts/342 Which represents: http://www.sitedomainname.com/function/sitename/page_id I have looked at the tutorial on remapping the urls this way via the routes file, http://ellislab.com/codeigniter/user-guide/general/routing.html but don't see an example that applies. Please advise. mapping routes - El Forum - 09-24-2008 [eluser]paulcj2[/eluser] I tried Code: $route['page/([a-z]+)/(:num)'] = "page/index/$1/$2"; and the url Code: http://clickbasicsdemo.com/page/clickbasicsdemo/437 Code: class Page extends Controller { Code: http://localhost/clickbasicsdemo/index.php/page/clickbasicsdemo/437 mapping routes - El Forum - 09-24-2008 [eluser]paulcj2[/eluser] I found: http://ellislab.com/codeigniter/user-guide/general/urls.html and tried adding to my .htaccess file Code: RewriteEngine on I checked the apache/cong/httpd.conf file and it is set to allow all in the .htaccess file Code: AllowOverride All mapping routes - El Forum - 09-24-2008 [eluser]paulcj2[/eluser] Everything works fine on my production server. Somehow the .htaccess file still throws a 500 error on my XAMPP development server. Hmmmmmm. mapping routes - El Forum - 09-24-2008 [eluser]paulcj2[/eluser] I changed my .htaccess file on my development server to: Code: RewriteRule ^(.*)$ http://localhost/clickbasicsdemo/index.php/$1 [L] mapping routes - El Forum - 09-24-2008 [eluser]metaltapimenye[/eluser] gee.. u left me no space to put some words uh?.. mapping routes - El Forum - 09-25-2008 [eluser]paulcj2[/eluser] Thanks for checking in, anyway. |