× Here you can get community support related to ReDJ.

How to redirect jpg images

More
9 years 6 months ago #3084 by jvdh
How to redirect jpg images was created by jvdh
How can I redirect images.

I tried the following.
From URL: ^/folder/subfolder/image01.jpg$
To URL: http://{siteurl}/folder/subfolder/newimage01.jpg

But this doesn't work.
If I change jpg to swf it does work. Why?

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #3086 by admin
Replied by admin on topic How to redirect jpg images
Hi,
probably the image exists, in these cases is apache to manage the requests and send images so no way for joomla and redj to intercept and redirect the request. If this is not the case let me know and we will investigate further.
The following user(s) said Thank You: jvdh

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago - 9 years 6 months ago #3089 by jvdh
Replied by jvdh on topic How to redirect jpg images
You are right Admin.

When I change
^/folder/subfolder/image01.jpg$
to
^/otherfolder/subfolder/image01.jpg$
it works.

But I do think there is a little bug in ReDJ.
This is the situation.
I have an old site for example www.domainname.com
I'm working on a new site for example at www.domainname.com/new
I've temporary set the "Base path" in "System - ReDJ Community" [Advanced] tab to /new
So you think it should'nt matter that the image exists in the old site because the rule should work from www.domainname.com/new
Last edit: 9 years 6 months ago by jvdh.

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #3090 by admin
Replied by admin on topic How to redirect jpg images
Maybe I was not clear. Let me try to explain better. When your web server receives a request like:

www.domainname.com/folder/subfolder/image.jpg

Or:

www.domainname.com/new/folder/subfolder/image.jpg

Then the web server first checks if the file exists. In this case it takes the file and send to the client. Joomla and ReDJ are not invited to the party at all.

Think to all static assets you get together with a page (CSS, JS, images, etc). They are all sent by the web server itself (except if you tell him something different, but this can be done with .htaccess file of httpd.conf or something similar).

The "Base path" is just a param that allows you to write rules without to take care of the current subfolder, so when you will move the site you will not have to change the rules (just the global base path param).

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

Time to create page: 0.102 seconds