Welcome Guest, Not a member yet? Register   Sign In
htaccess and codeigniter - help needed
#1

[eluser]msgmash[/eluser]
Hi

I am trying to achieve the following in my codeigniter-based web application:

- allow URLs without index.php at the beginning, and
- allow URLs that begin with the path /media, with the addition that if the file referred to does not exist, then the URL is rewritten to a URL that calls a controller via index.php (which itself retrieves the file from a Mongo database and writes it to the given filename, and redirects back to the file).

My .htaccess file is something like:
Code:
RewriteEngine On

RewriteCond %{REQUEST_URI}  ^media
RewriteRule ^(.*)$  /index.php/getimage/get [L]

RewriteCond $1 !^(index\.php|test|aehkle|jquery-ui-custom|img|css|js|bootstrap|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

This is one of several incarnations I have tried, but all I achieve is a 404 error in the codeigniter log file.

I would be grateful for any help, because it's been over a day now I've been trying to solve this Sad

Many thanks

Simon




Theme © iAndrew 2016 - Forum software by © MyBB