Reputation: 95
I have an external photo library in the root of my code igniter project that I used for my non MVC framework projects in the past.I want to use embed that library to my new code igniter project.How can I achieve this as my php photo library is not MVC based? I mean in external folder folder, it works fine when I access the index.php with my ip address like this:
http://10.0.0.27/myproject/mylibrary/
But when i try to access the library using this :
http://myproject.new/mylibrary/
it gives me error 404" Page not found" which I can assume is due to non MVC pattern of that photo library.How can i solve this issue?is there anyway i can access my library like this??? ie.
http://myproject.new/mylibrary/
Upvotes: 0
Views: 666
Reputation: 64526
Since you don't have index.php
in your URL, you probably have something like this in your htaccess:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
The above rewrites everything except images and robots.txt to your index.php, so you can modify that to exclude mylibrary
as well:
RewriteCond $1 !^(index\.php|images|mylibrary|robots\.txt)
Upvotes: 2
Reputation: 10469
I assume (based on your url) you are rewriting the urls
If you're using the default codeigniter based url rewriting patterns you can add the /mylibrary/
folder to the list of excluded items
RewriteEngine on
RewriteCond $1 !^(index\.php|mylibrary|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Now you should be able to directly access that folder
Upvotes: 1