Re: [users@httpd] RewriteRule and priorities

2023-07-25 Thread Daniel Ferradal
El lun, 17 jul 2023 a las 12:09, Konstantin Kolinko () escribió: > пн, 17 июл. 2023 г. в 05:24, Dave Wreski .invalid>: > > > > Hi, > > > > I have a rewriterule like: > > > > RewriteRule ^/blog/(.*) /resources/blog/$1 [L,R=301] > > > > but I also have several instances where there are exceptions.

Re: [users@httpd] RewriteRule and priorities

2023-07-17 Thread Konstantin Kolinko
пн, 17 июл. 2023 г. в 05:24, Dave Wreski : > > Hi, > > I have a rewriterule like: > > RewriteRule ^/blog/(.*) /resources/blog/$1 [L,R=301] > > but I also have several instances where there are exceptions. In other words, > I have an article at /blog/ that I want to be redirected to some place

[users@httpd] RewriteRule and priorities

2023-07-16 Thread Dave Wreski
Hi, I have a rewriterule like: RewriteRule ^/blog/(.*) /resources/blog/$1 [L,R=301] but I also have several instances where there are exceptions. In other words, I have an article at /blog/ that I want to be redirected to some place other than /resources/blog. How can I do this? Order of

Re: [users@httpd] RewriteRule and md5 (or expressions)

2022-12-10 Thread Eric Covener
On Sat, Dec 10, 2022 at 7:49 AM Eric Covener wrote: > > > I thought of setting a variable with SetEnvIfExpr, or with RewriteCond, > > but they're not designed for that and I don't think that's possible. > > I think the SetEnvIfExpr way is the way to go. Whoops, I missed in the doc even after

Re: [users@httpd] RewriteRule and md5 (or expressions)

2022-12-10 Thread Eric Covener
> I thought of setting a variable with SetEnvIfExpr, or with RewriteCond, > but they're not designed for that and I don't think that's possible. I think the SetEnvIfExpr way is the way to go. - To unsubscribe, e-mail:

Re: [users@httpd] RewriteRule and md5 (or expressions)

2022-12-10 Thread BohwaZ
Thank you, yes it was also what I thought, but RewriteMap is not available in .htaccess, and this is for an app that is mostly used on mass hosting providers, with no access to the server config. - To unsubscribe, e-mail:

Re: [users@httpd] RewriteRule and md5 (or expressions)

2022-12-09 Thread Frank Gingras
I would use a plain rewrite map for this case. On Fri, Dec 9, 2022 at 8:50 PM BohwaZ wrote: > Hi everyone, > > I'm wondering if it's possible to rewrite the current URL to a MD5 hash > of the request URL. > > What I'm trying to do is serve "/cache/[MD5 hash of URL].html" when a > request on

[users@httpd] RewriteRule and md5 (or expressions)

2022-12-09 Thread BohwaZ
Hi everyone, I'm wondering if it's possible to rewrite the current URL to a MD5 hash of the request URL. What I'm trying to do is serve "/cache/[MD5 hash of URL].html" when a request on "/URL" is done. This is for caching dynamic content: if the MD5 hash file exists, then serve the static file,

Re: [users@httpd] RewriteRule Time settings for sub folders

2021-03-17 Thread Eric Covener
https://httpd.apache.org/docs/trunk/rewrite/advanced.html#time-dependent On Wed, Mar 17, 2021, 5:35 PM Jens Kallup wrote: > Hello, > > I use Apache 2.4. is it possible to add time based openings in vhost's > sub/multiple directories? > When yes, how can I do this? > > Greets, Jens > > >

Re: [users@httpd] RewriteRule Time settings for sub folders

2021-03-17 Thread Will Fatherley
On Wed, Mar 17, 2021 at 5:36 PM Jens Kallup wrote: > Hello, > > I use Apache 2.4. is it possible to add time based openings in vhost's > sub/multiple directories? > When yes, how can I do this? > > A possibility might be to write up a cron script that interchanges the value of an environment

Re: [users@httpd] RewriteRule Time settings for sub folders

2021-03-17 Thread Antony Stone
On Wednesday 17 March 2021 at 22:35:36, Jens Kallup wrote: > Hello, > > I use Apache 2.4. is it possible to add time based openings in vhost's > sub/multiple directories? I do not believe apache can use time specifications in its configuration files. Out of interest, what would you do with

[users@httpd] RewriteRule Time settings for sub folders

2021-03-17 Thread Jens Kallup
Hello, I use Apache 2.4.  is it possible to add time based openings in vhost's sub/multiple directories? When yes, how can I do this? Greets, Jens - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional

[users@httpd] RewriteRule - straightforward exclude from reverse proxying?

2020-06-25 Thread hostalp
Hello, is there anything like ProxyPass /path ! (that excludes the specified path from reverse proxying) for RewriteRule ... [P] ? Yes, the RewriteRule pattern may be adjusted to take care of that, or RewriteCond may be added to achieve similar result, but it's all quite cumbersome

Re: [users@httpd] RewriteRule Blind to Parent Directories

2020-02-07 Thread Eric Covener
On Fri, Feb 7, 2020 at 12:48 PM Wayne Sallee wrote: > > RewriteRule is Blind to Parent Directories. > > So if I have: > > > RewriteRule (.*) mywebsite.com/dir1/index?$1 > > > > And the url entered is: > mywebsite.com/dir1/dir2/dir3/dir4/dir5/test > > It will get redirected to: >

[users@httpd] RewriteRule Blind to Parent Directories

2020-02-07 Thread Wayne Sallee
RewriteRule is Blind to Parent Directories. So if I have: RewriteRule (.*) mywebsite.com/dir1/index?$1 And the url entered is: mywebsite.com/dir1/dir2/dir3/dir4/dir5/test It will get redirected to: mywebsite.com/dir1/index?dir5/test Instead of:

Re: [users@httpd] RewriteRule overbinding in 2.2

2019-04-30 Thread Aaron Macks2
Apparently I needed to just tell it to the bear. In looking to verify rewritelog configs I found that the rewrite I was changing was not the one being hit, wrong vHost A Aaron Macks Systems Architect On Apr 30, 2019, at 11:14 AM, Eric Covener

Re: [users@httpd] RewriteRule overbinding in 2.2

2019-04-30 Thread Eric Covener
On Tue, Apr 30, 2019 at 11:05 AM Aaron Macks2 wrote: > > I have a problem with a RewriteRule where it appears to be over-binding in > the REGEX: > > RewriteRule ([0-9]{4,6}(?:-[0-9]{1,2})?\.jpg)$ > /cgi-bin/logo-image.pl?image=$1 [L,PT] > > What it should do is bind a 4-6 digit number,

[users@httpd] RewriteRule overbinding in 2.2

2019-04-30 Thread Aaron Macks2
I have a problem with a RewriteRule where it appears to be over-binding in the REGEX: RewriteRule ([0-9]{4,6}(?:-[0-9]{1,2})?\.jpg)$ /cgi-bin/logo-image.pl?image=$1 [L,PT] What it should do is bind a 4-6 digit number, followed by an optional - and a 1-2 digit number, and finally .jpg, at

Re: [users@httpd] RewriteRule: Pattern matching and grouping part of the URL expands to its local filesystem path

2017-08-29 Thread Luca Toscano
Hi Gustau, 2017-08-22 9:01 GMT+02:00 Gustau Perez : > >Hello everybody, > >I’ve checking all kinds of sources of information so far without > success, I hope I didn’t miss anything. > >I have a very simple RewriteRule which should take the requested >

[users@httpd] RewriteRule: Pattern matching and grouping part of the URL expands to its local filesystem path

2017-08-22 Thread Gustau Perez
Hello everybody, I’ve checking all kinds of sources of information so far without success, I hope I didn’t miss anything. I have a very simple RewriteRule which should take the requested resource part. What I want to achieve is to prepend an string before that matched path.

Re: [users@httpd] RewriteRule : Altering the current protocol

2017-08-08 Thread Konstantin Kolinko
2017-08-07 18:42 GMT+03:00 Philippe Busque : > Hello, > I have a configuration question regarding RewriteRule. > > We have a SSL terminator in front of our Apache, which redirect traffic to > different port based virtual host depending on which protocol the connection > came

[users@httpd] RewriteRule : Altering the current protocol

2017-08-07 Thread Philippe Busque
Hello, I have a configuration question regarding RewriteRule. We have a SSL terminator in front of our Apache, which redirect traffic to different port based virtual host depending on which protocol the connection came from. As a result, Apache is only responding to HTTP requests. We have

[users@httpd] RewriteRule in .htaccess disables directive AddInputFilter DEFLATE from httpd.conf

2017-07-12 Thread kwyjibo
I have configured my apache installation to accept a gzipped body on http requests. I did this by adding in the main apache configuration file the following lines: SetInputFilter DEFLATE It works as expected except in the case that a matching RewriteRule directive is

[users@httpd] RewriteRule not working, 404 error obtained

2016-06-28 Thread thomas Armstrong
Hi. Using Apache/2.2.31, I created the following rule on my '.htaccess' file: -- RewriteEngine on RewriteRule ^([^/]+)/$ /do.php?label=$1 [L] -- However, when accessing 'http://foo.com/whatever/', I get a 404 error message. I've checked my error log and: --- [Mon Jun 27

[users@httpd] RewriteRule help

2013-04-12 Thread Dean Del Ponte
Would someone be so kind as to provide an example solution for the following problem. I would like all requests to the base url /products/flash/** redirected to /flash/** For example /products/flash/awesomenessredirects to/flash/awesomeness /products/flash/really/cool/stuffredirects

Re: [users@httpd] RewriteRule help

2013-04-12 Thread Pete Houston
No need to use RewriteRule for that, simply use Redirect. Redirect /products/flash /flash http://httpd.apache.org/docs/2.4/mod/mod_alias.html#redirect Pete -- Openstrike - improving business through open source http://www.openstrike.co.uk/ or call 01722 770036 / 07092 020107

Re: [users@httpd] RewriteRule help

2013-04-12 Thread Dean Del Ponte
Thanks Pete! I guess I have something wonky with my Apache config. Rewrites work but Redirects don't. Redirects have no affect. I'll look into it a bit more. Thanks again! Dean On Fri, Apr 12, 2013 at 9:44 AM, Pete Houston p...@openstrike.co.uk wrote: No need to use RewriteRule for that,

[users@httpd] RewriteRule problem

2013-02-08 Thread Coughlin, Michael J
The request: www.mysite.com/testing123 The rule: RewriteRule ^(testing.*)$ test.php?req=$1 [NC,L] test.php properly renders the querystring req=testing123 (its only purpose to verify the querystring) BUT, RewriteRule ^(t.*)$ test.php?req=$1 [NC,L] gives me: req=test.php. I don't get it.

Re: [users@httpd] RewriteRule problem

2013-02-08 Thread Boubouch
Hi, Could you try this RewriteRule ^(testing.*)$ test.php?req=$1 [NC,END] Le 8 févr. 2013 à 22:19, Coughlin, Michael J michael.cough...@opm.gov a écrit : The request: www.mysite.com/testing123 The rule: RewriteRule ^(testing.*)$ test.php?req=$1 [NC,L] test.php properly renders

RE: [users@httpd] RewriteRule problem

2013-02-08 Thread Coughlin, Michael J
END is not a valid flag. That generates a server error. From: Boubouch [boubouc...@gmail.com] Sent: Friday, February 08, 2013 4:46 PM To: users@httpd.apache.org Cc: users@httpd.apache.org Subject: Re: [users@httpd] RewriteRule problem Hi, Could you try

Re: [users@httpd] RewriteRule problem

2013-02-08 Thread Boubouch
Sorry i mean RewriteRule ^(t.*)$ test.php?req=$1 [NC,END] The flags END are stronger than L and may be you loop from testing123 to test.php both matching Le 8 févr. 2013 à 22:46, Boubouch boubouc...@gmail.com a écrit : Hi, Could you try this RewriteRule ^(t.*)$ test.php?req=$1

RE: [users@httpd] RewriteRule problem

2013-02-08 Thread Coughlin, Michael J
. From: Boubouch [boubouc...@gmail.com] Sent: Friday, February 08, 2013 4:54 PM To: users@httpd.apache.org Subject: Re: [users@httpd] RewriteRule problem Sorry i mean RewriteRule ^(t.*)$ test.php?req=$1 [NC,END] The flags END are stronger than L and may be you loop from

[users@httpd] RewriteRule

2012-01-18 Thread Roman Gelfand
I am trying to proxy off requests from wan url https://external.mydomain.com/sipxconfig to an internal site https://internal.mydomain.com:8443/sipxconfig. This what I attempted to do RewriteRule ^https://external.mydomain.com:8443$ https://external.mydomain.com/ [R] RewriteRule

Re: [users@httpd] RewriteRule

2012-01-18 Thread Igor Cicimov
You rewrite based on the URI not the URL. Read the mod_rewrite docs and examples. On Jan 19, 2012 5:37 AM, Roman Gelfand rgelfa...@gmail.com wrote: I am trying to proxy off requests from wan url https://external.mydomain.com/sipxconfig to an internal site

[users@httpd] RewriteRule question

2011-08-25 Thread Denys
Hello - I need to create some kind of proxy using Apache Server. I tried to use something like ProxyPass /test1/test2/ http://example.com but had no success because ProxyPass require / suffix after the second URL. In my case adding / is not working because my URL ends with example.dll and now

Re: [users@httpd] RewriteRule question

2011-08-25 Thread Igor Cicimov
RewriteRule /example/ http://example.com [P,L] On Thu, Aug 25, 2011 at 8:19 PM, Denys dhryvas...@serena.com wrote: Hello - I need to create some kind of proxy using Apache Server. I tried to use something like ProxyPass /test1/test2/ http://example.com but had no success because

[users@httpd] RewriteRule acts differently for different browsers

2011-07-25 Thread James Moe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, apache v2.0 The reason for this redirection is that when I purchased the SSL certificate, I did not know to get one for than the domain's URL, sohnen-moe.com. A secure connection to www.sohnen-moe.com brings up the warning about a possibly

Re: [users@httpd] RewriteRule help

2011-07-25 Thread James Moe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 O That does not change anything. Here is what I put in the CONF file: Directory /var/www/html Directory is basically the same as htaccess. Oh. My ISP has a rather restrictive approach to what can be modified in httpd.conf. The virtualhost

Re: [users@httpd] RewriteRule acts differently for different browsers

2011-07-25 Thread Jeroen Geilman
On 2011-07-25 20:45, James Moe wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, apache v2.0 The reason for this redirection is that when I purchased the SSL certificate, I did not know to get one for than the domain's URL, sohnen-moe.com. A secure connection

Re: [users@httpd] RewriteRule acts differently for different browsers

2011-07-25 Thread James Moe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/25/2011 12:14 PM, Jeroen Geilman wrote: You should not use rewriting for this, it is entirely unnecessary and only adds complexity. Instead, you add a new vhost for www.sohnen-moe.com, and do a blank redirect to HTTPS. The ISP for our

Re: [users@httpd] RewriteRule acts differently for different browsers

2011-07-25 Thread Jeroen Geilman
On 2011-07-25 22:49, James Moe wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/25/2011 12:14 PM, Jeroen Geilman wrote: You should not use rewriting for this, it is entirely unnecessary and only adds complexity. Instead, you add a new vhost for www.sohnen-moe.com, and do a blank

Re: [users@httpd] RewriteRule help

2011-07-24 Thread James Moe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/23/2011 12:26 PM, Eric Covener wrote: How do I get the redirection to occur before the non-secure authorization request? If you put the rules in virtualhost context instead of htaccess, they'll be evaluated earlier. That does not

Re: [users@httpd] RewriteRule help

2011-07-24 Thread Eric Covener
On Sun, Jul 24, 2011 at 6:36 PM, James Moe ji...@sohnen-moe.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/23/2011 12:26 PM, Eric Covener wrote: How do I get the redirection to occur before the non-secure authorization request? If you put the rules in virtualhost context

[users@httpd] RewriteRule help

2011-07-23 Thread James Moe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, This rule works, mostly. It is in the .htaccess file of the DocumentRoot. RewriteEngine On RewriteCond %{REQUEST_URI} =/teachers/ [OR] RewriteCond %{REQUEST_URI} =/gated-bm/ RewriteCond %{SERVER_PORT} =80 RewriteRule ^(.*)$

Re: [users@httpd] RewriteRule help

2011-07-23 Thread Eric Covener
 How do I get the redirection to occur before the non-secure authorization request? If you put the rules in virtualhost context instead of htaccess, they'll be evaluated earlier. - The official User-To-User support forum of

[users@httpd] RewriteRule and enabling pcre UTF-8 mode

2011-04-14 Thread Haim Ashkenazi
Hi I'm having a problem matching a single character in case of UTF8 characters (hebrew in my case). With rewrite rule (sorry for the hebrew in the example, but whenever you see '?' it's a sign that it's not good :): - RewriteRule ^/users/(.)(.*) /users/$1/$2 [L] when going to /users/משהכהן

Re: [users@httpd] RewriteRule and enabling pcre UTF-8 mode

2011-04-14 Thread Nick Kew
On 14 Apr 2011, at 10:32, Haim Ashkenazi wrote: But the (*UTF8) syntax causes a syntax error in httpd 2.2.3 (CentOS 5.x). What's the error message? Can't see anything in mod_rewrite that would reject a valid pattern, so I wonder if the pcre you've linked was compiled without utf8 support? --

Re: [users@httpd] RewriteRule and enabling pcre UTF-8 mode

2011-04-14 Thread Haim Ashkenazi
Hi On Thu, Apr 14, 2011 at 1:16 PM, Nick Kew n...@webthing.com wrote: On 14 Apr 2011, at 10:32, Haim Ashkenazi wrote: But the (*UTF8) syntax causes a syntax error in httpd 2.2.3 (CentOS 5.x). What's the error message? Can't see anything in mod_rewrite that would reject a valid pattern,

RE: [users@httpd] RewriteRule issue

2005-07-11 Thread Axel-Stéphane SMORGRAV
If you could provide us with the RewriteRule, maybe we will be able to better understand what should be done... -ascs -Original Message- From: Devraj Mukherjee [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 1:17 AM To: users@httpd.apache.org Subject: [EMAIL PROTECTED]

Re: [users@httpd] RewriteRule question: forward requests from one Apache server to another

2005-07-07 Thread Cameron Beattie
Thanks for the tip. I prefer that way. The final config is: Server 1 NameVirtualHost *:80 VirtualHost *:80 ServerName server.mydomain.com ProxyPreserveHost On RewriteEngine On RewriteRule ^/(.*) http://60.234.nnn.nn:8008/$1 [L,P] /VirtualHost VirtualHost *:80

RE: [users@httpd] RewriteRule question: forward requests from one Apache server to another

2005-06-29 Thread Boyle Owen
-Original Message- From: Cameron Beattie [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 29. Juni 2005 07:17 To: users@httpd.apache.org Subject: Re: [EMAIL PROTECTED] RewriteRule question: forward requests from one Apache server to another For those interested, I ended up using

RE: [users@httpd] RewriteRule question: forward requests from one Apache server to another

2005-06-28 Thread Boyle Owen
-Original Message- From: Cameron Beattie [mailto:[EMAIL PROTECTED] Sent: Dienstag, 28. Juni 2005 04:50 To: users@httpd.apache.org Subject: [EMAIL PROTECTED] RewriteRule question: forward requests from one Apache server to another I am trying to set up the following

Re: [users@httpd] RewriteRule question: forward requests from one Apache server to another

2005-06-28 Thread Cameron Beattie
Ok so I checked httpd.conf on server 1 and I stupidly hadn't included RewriteEngine On. I've done that and now I get served up a site from server 2, but it's the wrong site. I have two virtual hosts set up as follows: Server 1 NameVirtualHost *:80 VirtualHost *:80 ServerName

Re: [users@httpd] RewriteRule question: forward requests from one Apache server to another

2005-06-28 Thread Cameron Beattie
For those interested, I ended up using different ports to achieve the desired result. There may be a better way but this works for me: Server 1 VirtualHost *:80 ServerName server.mydomain.com RewriteEngine On RewriteRule ^/(.*) http://60.234.nnn.nn:8008/$1 [L,P] /VirtualHost

[users@httpd] RewriteRule question: forward requests from one Apache server to another

2005-06-27 Thread Cameron Beattie
I am trying to set up the following configuration: 1. Apache server with public IP address 2. Apache server behind NAT with no public IP address 3. Router with public IP address with port forwarding set up for port 8008 to Apache server 2 4. Public DNS record server.mydomain.com resolves to IP

RE: [users@httpd] RewriteRule problems

2005-06-16 Thread Axel-Stphane SMORGRAV
L is not necessary when you use P. P will force the request to be handled by mod_proxy. -ascs -Original Message- From: Ian Huynh [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 14, 2005 7:08 PM To: users@httpd.apache.org Subject: RE: [EMAIL PROTECTED] RewriteRule problems what does your

Re: [users@httpd] RewriteRule problems

2005-06-16 Thread Krist van Besien
On 6/15/05, Arne Heizmann [EMAIL PROTECTED] wrote: Krist van Besien wrote: I get the impression that probably somewhere in your httpd config there is an access rule that forbids access to the /old URL, and that therefore the 403 Forbidden gets triggered before everything else. But the

Re: [users@httpd] RewriteRule problems

2005-06-15 Thread Arne Heizmann
Ian Huynh wrote: what does your rewrite log file say? If you add RewriteEngine on RewriteLog /usr/local/var/apache/logs/rewrite.log--- change this to your appropriate path RewriteLogLevel 9 -- use level 9 only for debugging. RewriteRule ^/old/(.*)

Re: [users@httpd] RewriteRule problems

2005-06-15 Thread Arne Heizmann
Krist van Besien wrote: Did you configure you apache to allow proxying? [...] You need something like this in your apache: ProxyRequests Off Proxy * Order deny,allow Allow from all /Proxy I've added this, and it doesn't seem to have an effect. I still get the Forbidden message. I

Re: [users@httpd] RewriteRule problems

2005-06-15 Thread Krist van Besien
On 6/15/05, Arne Heizmann [EMAIL PROTECTED] wrote: Krist van Besien wrote: Did you configure you apache to allow proxying? [...] You need something like this in your apache: ProxyRequests Off Proxy * Order deny,allow Allow from all /Proxy I've added this, and it

Re: [users@httpd] RewriteRule problems

2005-06-15 Thread Arne Heizmann
Krist van Besien wrote: I get the impression that probably somewhere in your httpd config there is an access rule that forbids access to the /old URL, and that therefore the 403 Forbidden gets triggered before everything else. But the rewrite log shows that the rewrite module does process the

RE: [users@httpd] RewriteRule problems

2005-06-14 Thread Ian Huynh
what does your rewrite log file say? If you add RewriteEngine on RewriteLog /usr/local/var/apache/logs/rewrite.log--- change this to your appropriate path RewriteLogLevel 9 -- use level 9 only for debugging. RewriteRule ^/old/(.*)

[users@httpd] RewriteRule question

2005-05-31 Thread Gary W. Smith
I have been trying to implement a restriction list on server by referrer only. It doesn't seem to be working. I have a directory called restricted that holds some PDF (as well as other) documents that I want to prevent access to unless they have clicked the link on our site. Most of this is for

Re: [users@httpd] RewriteRule question

2005-05-31 Thread Arne Heizmann
Gary W. Smith wrote: I have the following rule in place: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(10\.20\.30\.40)/.*$ [NC] RewriteRule ^/restricted/.+ - [F] So suppose I go in with an empty referrer. The first condition is false. Therefore the

Re: [users@httpd] RewriteRule question

2005-05-31 Thread Gary W. Smith
I have also tried RewriteEngine on RewriteCond %{HTTP_REFERER} ^$ RewriteCond %{HTTP_REFERER} !^http://(10\.20\.30\.40)/.*$ [NC] RewriteRule ^/restricted/.+ - [F] And RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://(10\.20\.30\.40)/.*$ [NC] RewriteRule ^/restricted/.+ - [F] As well. I