Page 1 of 1

.HTACCESS: Server Redirect

Posted: Wed Oct 27, 2010 11:57 pm
by Quazel
Is their a mod_rewrite or any other .htaccess function to do this?

A client side script references the image:

Code: Select all

http://www.example.com/re/direct/image.jpg
And the mod_rewrite sees that and redirects the query to:

Code: Select all

http://www.example.com/here/now/image.jpg
The limitations:
If the file is accessed from a browser the actual url doesn't change but gets just the contents.
Their is no physical file their its just the .htaccess working its magic.
Must work with different files like:
A client side script references the image:

Code: Select all

http://www.example.com/re/direct/image3.jpg
And the mod_rewrite sees that and redirects the query to:

Code: Select all

http://www.example.com/here/now/image3.jpg

Re: .HTACCESS: Server Redirect

Posted: Thu Oct 28, 2010 8:05 pm
by Quazel
Anyone?

Re: .HTACCESS: Server Redirect

Posted: Thu Oct 28, 2010 10:17 pm
by s.dot
Yes, you can do it with mod_rewrite.

Re: .HTACCESS: Server Redirect

Posted: Fri Oct 29, 2010 3:59 pm
by Quazel
Can you be more specific on the expression to do that?