L
L
leMar2011-12-25 10:09:05
htaccess
leMar, 2011-12-25 10:09:05

RewriteRule only works on localhost

The following rule is written
RewriteRule (.*)wp-content/uploads/(.*) $1watermark.php?p=tl&q=100&src=wp-content/uploads/$2

It works locally, but not online.
Maybe it's because of [DOCUMENT_ROOT] => /home/site/site.ru/docs
But I still don't know what to do with it.
Help me please.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Andrey Burov, 2011-12-25
@leMar

The hosting apparently has Nginx, which gives static (jpeg, jpg, gif,png, etc.).

A
Anton, 2011-12-25
@sHinE

RewriteRule ^wp-content/uploads/(.*)$ /watermark.php?p=tl&q=100&src=wp-content/uploads/$1
Try this if you have WP in the root of the site and watermark in the root of the site. php lies.

A
Anton, 2011-12-25
@sHinE

Doesn't work how? Gives an error 500, 404, does not call the script? RewriteEngine On in .htaccess? Is mod_rewrite enabled on the server at all?

P
pel, 2011-12-25
@pel

And if you put a separate .htaccess with the
RewriteRule ^(.*)$ /watermark.php?p=tl&q=100&src=wp-content/uploads/$1 rule in the uploads folder
?

P
pel, 2011-12-25
@pel

Try using mod_rewrite logs to track how
google://mod_rewrite logging works

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question