CodeIgniter Forums
rewrite url's - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: rewrite url's (/showthread.php?tid=3139)



rewrite url's - El Forum - 09-12-2007

[eluser]yuccaplant[/eluser]
I'm using the example .htaccess to rewrite urls so I can exclude the 'index.php'. On my localhost url's without trailing slash get one added automagically (how come?). I rely on this to link to static content. On my remote host, the trailing slash doesn't get automatically added. Linking to static content is broken.

so on my localhost
www.mysite.be/home becomes www.mysite.be/home/

example:
for a url: www.mysite.be/home/ there's actually a folder www.mysite.be/home/ and a file www.mysite.be/home/index.php that get's included. In index.php a link to an image src="test.jpg". The url for this image becomes www.mysite.be/home/test.jpg. Because there is a file /home/test.jpg, this works just fine. As on my remote host there's no trailing slash (except for when you manually add it) it becomes: www.mysite.be/test.jpg in this case.

Anybody knows a solution?