V
V
Vladislav2016-02-05 00:33:04
Apache HTTP Server
Vladislav, 2016-02-05 00:33:04

Why doesn't rewritecond work in .htaccess?

Here is a piece of code from .htaccess:

RewriteEngine On

RewriteCond %{REMOTE_ADDR} !^178\.204\.71\.100
RewriteRule !stub.html$ https://site.ru/stub.html [L,R=301]

I need to transfer everyone to that link, except for me. My exception does not work and it also rethrows me, what's the matter?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Krasnov, 2016-02-05
@OKrasnov

Why !? Replace with ^.

RewriteRule ^stub.html$ https://site.ru/stub.html [L,R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question