Welcome Guest, Not a member yet? Register   Sign In
Rewrite url in CI
#1

Hello friends

Currently I'm doing the rewrite url of codeigniter. Now need to show as .jpg to be cloudflare to cache images after editing to help the server heavy.


$ route ['seccimg.jpg'] = "home/convertimg";

-> this command it fails to run.

The reason is that it reads a .jpg file as an error file before going into the index.php in CI

But I don't know how to fix it. I'm using nginx centos 7


Thank you. sorry for my bad English
Reply
#2

Hi, what are your convertimg doing? It dosen't matter if the url contains an .jpg or not, caching engines look for headers, so you need to use headers to tell what you are displaying.
Reply
#3

convertimg is editing the image (resize + add background + watermark ....)
I added .jpg to dc cache from cloundflare to save bandwidth + cpu
Reply
#4

Is it displaying it or saving it? If you just convert it and never use it. It would not matter.
You will also need to have a unique url, or cache servers don't pick it up as new.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB