Hi team,
Apache mod_proxy ProxyPass supports multiple key=value parameters.
RewriteRule with [P] flag causes the request to be handled by mod_proxy. Is
there a way in RewriteRule to pass some key=value to mod_proxy ProxyPass?
eg: ProxyPass can transparently support websocket via upgrade=websocket
Hi,
Replace the following:
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
With:
FallbackResource /index.php
Thanks so much, as usual. That's very helpful. After like ten hours of
debugging, I als
On Sun, Aug 4, 2024 at 9:54 PM Dave Wreski
wrote:
> Hi,
>
> I have a rewrite that's creating a loop because the origin is contained in
>>> the final destination. I know it then is processed again by the .htaccess
>>> in the document root, but I don't understand why or how to stop it. What's
>>> t
Hi,
I have a rewrite that's creating a loop because the origin is
contained in the final destination. I know it then is
processed again by the .htaccess in the document root, but I
don't understand why or how to stop it. What's the solution here?
RewriteR
On Fri, Aug 2, 2024 at 11:08 AM Dave Wreski
wrote:
> Hi,
>
> I have a rewrite that's creating a loop because the origin is contained in
>> the final destination. I know it then is processed again by the .htaccess
>> in the document root, but I don't understand why or how to stop it. What's
>> the
Hi,
I have a rewrite that's creating a loop because the origin is
contained in the final destination. I know it then is processed
again by the .htaccess in the document root, but I don't
understand why or how to stop it. What's the solution here?
RewriteRule
^/features/l
On Fri, Aug 2, 2024 at 10:18 AM Dave Wreski
wrote:
> Hi,
>
> I have a rewrite that's creating a loop because the origin is contained in
> the final destination. I know it then is processed again by the .htaccess
> in the document root, but I don't understand why or how to stop it. What's
> the so
Hi,
I have a rewrite that's creating a loop because the origin is contained
in the final destination. I know it then is processed again by the
.htaccess in the document root, but I don't understand why or how to
stop it. What's the solution here?
RewriteRule
^/features/linux-malware-the-tru
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.
пн, 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 othe
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 pr
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 chec
> 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: users-unsub
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: users-un
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 "/UR
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, i
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
>
>
> ---
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 var
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 the
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 com
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 wi
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:
> mywebsite.com/di
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:
mywebsite.com/dir1/index?dir1/dir2/dir3/dir4/
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
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, follo
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
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
> resource part. What I want to ach
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.
Something
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 from.
> As a result, Ap
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 Rewr
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 found,
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 11
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 wrote:
> No need to use RewriteRule for that, simply use Redirect.
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
pgp4dt348
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/stuffredirect
the repass.
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
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 a écrit :
> Hi,
>
> Could you try this
>
>> RewriteRule ^(t.*)$ test.php?req=$1 [NC,END]
>
>
> Le
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
Hi,
Could you try this
> RewriteRule ^(testing.*)$ test.php?req=$1 [NC,END]
Le 8 févr. 2013 à 22:19, "Coughlin, Michael J" a
écrit :
> The request:
>
> www.mysite.com/testing123
>
> The rule:
>
> RewriteRule ^(testing.*)$ test.php?req=$1 [NC,L]
>
> test.php properly renders the querystri
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
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" wrote:
> 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.
>
> T
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 ^https://internal.
RewriteRule /example/ http://example.com [P,L]
On Thu, Aug 25, 2011 at 8:19 PM, Denys 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
> ProxyPass require "/"
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 no
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 redir
-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
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,
. A secure connection to brings up
the warning about a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
O>> That does not change anything. Here is what I put in the CONF file:
>>
>>
> Directory is basically the same as htaccess.
>
Oh.
My ISP has a rather restrictive approach to what can be modified in
. The virtualhost definitions are off limits.
-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,
. A secure connection to brings up
the warning about a possibly "untrusted site."
RewriteEngine
On Sun, Jul 24, 2011 at 6:36 PM, James Moe 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 inste
-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 d
> 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
-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 ^(.*)$ https://%{HTTP_HOS
Hi
On Thu, Apr 14, 2011 at 1:16 PM, Nick Kew 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, so I wonde
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?
--
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/משהכהן
I
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] RewriteRul
Hi All,
I am implementing a site using Apache 2.0/PHP/MySQL and using the Typo3
content management product. Everything works well but (there is always a
but) a little Rewrite problem.
We migrated from a static site so Google and all the other search
engines still bring up search results for
Thanks for the tip. I prefer that way. The final config is:
Server 1
NameVirtualHost *:80
ServerName server.mydomain.com
ProxyPreserveHost On
RewriteEngine On
RewriteRule ^/(.*) http://60.234.nnn.nn:8008/$1 [L,P]
ServerName otherserver.mydomain.com
Pro
On 6/29/05, Cameron Beattie <[EMAIL PROTECTED]> wrote:
> 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:
Good that it works now, but your original setup would have worked had you added:
ProxyPreserveHost On
> -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 usin
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
ServerName server.mydomain.com
RewriteEngine On
RewriteRule ^/(.*) http://60.234.nnn.nn:8008/$1 [L,P]
ServerName otherserv
> -Original Message-
> From: Cameron Beattie [mailto:[EMAIL PROTECTED]
> Sent: Dienstag, 28. Juni 2005 10:15
> To: users@httpd.apache.org
> Subject: Re: [EMAIL PROTECTED] RewriteRule question: forward requests from
> one Apache server to another
>
>
> Ok so I checked httpd.conf on server
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
ServerName server.mydomain.com
> -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 confi
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 a
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.
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
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 th
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
> >
> > Order deny,allow
> > Allow from all
> >
>
> I've added this, an
Krist van Besien wrote:
Did you configure you apache to allow proxying? [...] You need something like this in your apache:
ProxyRequests Off
Order deny,allow
Allow from all
I've added this, and it doesn't seem to have an effect. I still get the
Forbidden message. I also tried "Pr
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
On 6/14/05, Arne Heizmann <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I get a 403 Forbidden when trying to use a RewriteRule to proxy a
> request to another server.
>
> I have two servers, ukrbcsr01 and ukrbcsr02. ukrbcsr02 is accessible
> from the outside, ukrbcsr01 isn't. Their LAN IPs are 192.168.
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/(.*) http://ukrbc
Hi,
I get a 403 Forbidden when trying to use a RewriteRule to proxy a
request to another server.
I have two servers, ukrbcsr01 and ukrbcsr02. ukrbcsr02 is accessible
from the outside, ukrbcsr01 isn't. Their LAN IPs are 192.168.0.131 and
192.168.0.132, respectively. I can access one from the
On Tue, May 31, 2005 at 12:33:35PM -0700, Gary W. Smith wrote:
> 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_REFERE
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
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 ru
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
79 matches
Mail list logo