Welcome Guest, Not a member yet? Register   Sign In
New CodeIgnitor question (Virtual directories equivalent)
#1

[eluser]Auzette[/eluser]
Hello, switched over from ASP.NET to CodeIgnitor and am enjoying the new methodologies and the simplicity of the system. Like it very much.

In IIS, I would set up virtual directories for certain assets (/css, /images, /js). The reason I did that is because if I had pages nested in subdirectories, I didn't want to have to change paths for each level in the nest (if a page was news/pages.aspx, for instance, I didn't want to refernce ../images, and if it was news/archive/pages.aspx, I didn't want to have to change it to ../../images). Virtual Directories did the trick for me in not having to deal with that.

In PHP, Apache, is there an equivalent approach? Generally, I notice that there isn't much nesting in CodeIgnitor examples, which is fine. I would, however, like to nest one of my pages (example: http://website/history/bios) and have it map to just the bios CIController (map to: http://website/index.php/bios, it seems). What happens when I do this is the CSS, images, and js directories are all one level off (because of the extra directory), and so the page doesn't load them.

First, can one replicate functionality of virtual directories? And two, in PHP/Apache with CI, is there a more optimal way to handle this situation than what I'm describing?

Thanks for any help.


Messages In This Thread
New CodeIgnitor question (Virtual directories equivalent) - by El Forum - 05-18-2012, 01:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB