I have img tags that have parameters as part of the url. These parameters are used for an ajax image crop. They look like this
<img src="/resize/45-800/files/myImage.jpeg" alt="Chania">
By adding /resize/45-800/
in front of the url
I am able to tell the ajax script to get that file from the files directory, and dump a cropped version into /resize/files/
My question is, is there a way to remove these parameters 45-800/
, which can be different each time, for file reading purposes only, so that html will read for the image like this
<img src="/resize/files/myImage.jpeg" alt="Chania">
but the world will see the src still like this
<img src="/resize/45-800/files/myImage.jpeg" alt="Chania">
Is this possible using htaccess?
I know I could use a query string and just use the ajax script to read from the src like this
<img src="/resize/files/myImage.jpeg?params=45-800" alt="Chania">
I was just hoping for a prettier way. I don't really want to use the question mark '?'.
The /resize
and /files
will always be there every time.
Does anyone know of a way?