rewrite rules |
[eluser]ernie[/eluser]
Hello, i'm having a hard time figuring out the following problem: In my previous projects i used an apache rewriterule to dynamically render images with different sizes from one source image: This is the rule: RewriteRule ^cache/([0-9]*)_([0-9]*)_(.*)\.(png|jpg|jpeg|gif|PNG|JPG|JPEG|GIF) index.php/image/render/$1/$2/$4/$3 [L] It looks in a cache folder if the requested image exists. If it does, it returns the existing file. If not, it redirects to a controller (Image.php) where that controller renders a new version from a source image uploaded via a CMS. The variables in the rewrite rule are: width, height, filename, extension. The controller looks in a folder called upload, and generates a new image according to the variables, and then it places it in the cache folder for future use. I've used this technique in every project i've made in the past, and it works perfectly. Now I've updated my template folder with the CI reactor version, and i keep getting the following error when i request an image from the cache folder: "The page you requested was not found" the request I make : http://localhost/projectx/cache/100_10000_DSC05621.JPG When I manually rewrite the request and paste it in the browser it works: http://localhost/projectx/image/render/1...g/DSC05621 When i try with the rewrite-rule it doesn't, but it did in previous CI versions. Am i missing something here? Did something change in the way request are re-routed to controller files? TIA! |
Messages In This Thread |
rewrite rules - by El Forum - 06-09-2011, 02:52 PM
rewrite rules - by El Forum - 06-09-2011, 08:26 PM
rewrite rules - by El Forum - 06-10-2011, 12:39 AM
rewrite rules - by El Forum - 06-10-2011, 05:34 AM
rewrite rules - by El Forum - 06-10-2011, 08:30 AM
rewrite rules - by El Forum - 06-10-2011, 10:23 AM
rewrite rules - by El Forum - 06-10-2011, 10:35 AM
|