Welcome Guest, Not a member yet? Register   Sign In
removing application directory from url
#1

[eluser]iConTM[/eluser]
I am running a frontend and backend application with CI.

For the Installation I followed following instructions:
http://www.maroonbytes.com/codeigniter/u...ter-setup/

so I have three folders:

- system
- frontend ( = the applications folder )
- backend ( contains a copy of the applications folder )

Everything is working fine except that I want to get rid off the application directory
in my urls Confused

e.g. "http://www.someexample.com/backend/application/images/someimage.jpg"

how can I fix this?

regards
#2

[eluser]mddd[/eluser]
Don't store images and other assets in the application folder.
Store them separately in one or more folders in the web root.
You can use /assets and make folders within that, or make folders like /js, /images, /css etc. directly in the web root.
Of course, make sure that links to those files are left alone by any .htaccess you use to rewrite urls.

Another import point about this: now you can lock the application folder (like the system folder) from being accessible at all by your users.
Users should never be able to directly access a file like /backend/application/models/some_dangerous_model.php.
#3

[eluser]iConTM[/eluser]
thanks for the good advice.

I did put my images and css folder outside the application folder:

backend/application
backend/images
backend/css

regards




Theme © iAndrew 2016 - Forum software by © MyBB