G
G
Gabe_B2015-09-15 18:26:35
Apache HTTP Server
Gabe_B, 2015-09-15 18:26:35

How to set up an internal redirect in htaccess?

Internal redirect not working.
HTACCESS itself:
RewriteEngine on
RewriteCond %{REQUEST_URI} (.*).(jpg|png|jpeg|gif)$ [NC]
RewriteRule ^(.*)$ www.site.com/img.gif [L]
Upon request, any pictures on my site should be replaced with a picture of another site.
Everything used to work before moving to another host. I remember that there was already such a problem, and it was solved by prescribing some settings in Apache. There is access to *.conf. Please help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ShamblerR, 2015-09-16
@ShamblerR

you have an error in the regular expression, moreover, a critical one,
for example, the page /megagif will be
considered a file
. .(jpg|png|jpeg|gif)$ [NC]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question