[users@httpd] mod_rewrite redirect not working in private browsing?

2023-03-20 Thread Jim Weill
We have a site which was run by a group whose members have all moved on, but they kept the website active to preserve their work online. They've asked it to be permanently redirected to the new location for anyone still using the old URL. I set this up in the site's .conf file under the conf.d pa

Re: [users@httpd] Mod_rewrite too many redirects

2022-11-24 Thread vicky chb
It worked!! Thanks a ton! Cheers -Vicky On Thu, 24 Nov 2022, 18:51 Eric Covener, wrote: > On Thu, Nov 24, 2022 at 8:09 AM vicky chb wrote: > > > > Hi, > > > > I am trying to achieve below redirection rule: > > http://localhost/?1234ab > > this url should be redirected to below url: > > http://

Re: [users@httpd] Mod_rewrite too many redirects

2022-11-24 Thread Eric Covener
On Thu, Nov 24, 2022 at 8:09 AM vicky chb wrote: > > Hi, > > I am trying to achieve below redirection rule: > http://localhost/?1234ab > this url should be redirected to below url: > http://localhost/welcome?trackFor=0&trackNo=1234ab > (where welcome?trackFor=0trackNo= always remains same) > > Her

[users@httpd] Mod_rewrite too many redirects

2022-11-24 Thread vicky chb
Hi, I am trying to achieve below redirection rule: http://localhost/?1234ab this url should be redirected to below url: http://localhost/welcome?trackFor=0&trackNo=1234ab (where welcome?trackFor=0trackNo= always remains same) Here you can see at the end, the query string is passed same as in sour

Re: [users@httpd] Mod_rewrite removing white spaces from outside url.

2020-06-07 Thread Wendell Hatcher
You are correct the inbound doesn’t have spaces and the redirect returning does so there isn’t anything to rewrite on. Let me work with the development team on the returned values. I appreciate the help and confirmation as well. Wendell > On Jun 7, 2020, at 5:00 PM, Eric Covener wrote: > >

Re: [users@httpd] Mod_rewrite removing white spaces from outside url.

2020-06-07 Thread Eric Covener
On Sun, Jun 7, 2020 at 4:03 PM Wendell Hatcher wrote: > > Thankyou Eric! :) > > Eric, before running I want to confirm that this will work below? Why guess? > applying pattern '^(.*/|)+(%20)+(.+)$' to uri '/' There's no spaces in the URL being requested. What could you rewrite? --

Re: [users@httpd] Mod_rewrite removing white spaces from outside url.

2020-06-07 Thread Wendell Hatcher
>  > Thankyou Eric! :) > > Eric, before running I want to confirm that this will work below? > > > > ProxyPreserveHost On > > ProxyPass / http://X.X.X.X:8080/login > > RewriteEngine On > > > RewriteRule ^(.*/|)+(%20)+(.+)$ $1$2 [L] > > # remove spaces from end or before / > RewriteRule

Re: [users@httpd] Mod_rewrite removing white spaces from outside url.

2020-06-07 Thread Wendell Hatcher
>  > Here are my logs as well. > > Eric, > > > 71.75.229.92 - - [13.56.11.156/sid#5646ee71d550][rid#7f5b5000ea70/initial] > init rewrite engine with requested uri / > [Sun Jun 07 19:59:35.067175 2020] [rewrite:trace3] [pid 5829:tid > 140030530008832] mod_rewrite.c(470): [client 71.75.229.92

Re: [users@httpd] Mod_rewrite removing white spaces from outside url.

2020-06-07 Thread Wendell Hatcher
Thankyou Eric! :) Eric, before running I want to confirm that this will work below? ProxyPreserveHost On ProxyPass / http://X.X.X.X:8080/login RewriteEngine On RewriteRule ^(.*/|)+(%20)+(.+)$ $1$2 [L] # remove spaces from end or before / RewriteRule ^(.+?)+(%20)+(/.*|)$ $1$2 [L] # replac

Re: [users@httpd] Mod_rewrite removing white spaces from outside url.

2020-06-07 Thread Wendell Hatcher
Here are my logs as well. Eric, 71.75.229.92 - - [13.56.11.156/sid#5646ee71d550][rid#7f5b5000ea70/initial] init rewrite engine with requested uri / [Sun Jun 07 19:59:35.067175 2020] [rewrite:trace3] [pid 5829:tid 140030530008832] mod_rewrite.c(470): [client 71.75.229.92:59917] 71.75.229.92 - - [

Re: [users@httpd] Mod_rewrite removing white spaces from outside url.

2020-06-07 Thread Eric Covener
> Our applications returning an outside url In a redirect? In HTML? > RewriteRule ^(.*/|)[\s%20]+(.+)$ $1$2 [L] If there is a literal %20 I don't think this should be in square brackets. I don't think the \s will ever match so I would drop it at the same time. > We want to return this url withou

[users@httpd] Mod_rewrite removing white spaces from outside url.

2020-06-07 Thread Wendell Hatcher
Hello, I have an issue where we have Apache 2.4.4.X using mod_proxy_balancer pointing at Apache Tomcat 8. Our applications returning an outside url that has space in the url i.e. (www.example.com/myapp/ structs/ somedata/ We want to return this url without spaces because it fails. I have tried Apac

Re: [users@httpd] mod_rewrite question on directory

2019-06-13 Thread Frank
Jim, Using mod_alias or mod_rewrite with [R] is functionally equivalent, yes. The former is simpler and easier to maintain, of course. Note that you can use RedirectMatch if you need PCRE support and/or captured expressions. On 12/06/19 05:42 PM, Jim Weill wrote: > So just to make sure I have th

Re: [users@httpd] mod_rewrite question on directory

2019-06-12 Thread Jim Weill
So just to make sure I have this correct: the main production server has a couple pages of rewrites for old URLs and home pages that moved servers or changed path. And changing the baseURL with a Redirect directive in a vhost instead of mod_rewrite will not break any of that? jim On Tue, Jun 11

Re: [users@httpd] mod_rewrite question on directory

2019-06-11 Thread Igor Cicimov
Agree, much better than all that rewrite gymnastics. IC On Wed, Jun 12, 2019, 6:30 AM Frank wrote: > No, I assure you, ,mod_rewrite is not needed here. > > To enforce a canonical hostname, use the Redirect directive and separate > vhost. To have all requests handled by a php routing script, use

Re: [users@httpd] mod_rewrite question on directory

2019-06-11 Thread Frank
No, I assure you, ,mod_rewrite is not needed here. To enforce a canonical hostname, use the Redirect directive and separate vhost. To have all requests handled by a php routing script, use FallbackResource /path/to/file.php Lastly, to redirect to https://, use Redirect from a :80 vhost. On 11/06

Re: [users@httpd] mod_rewrite question on directory

2019-06-11 Thread Jim Weill
The sites I am trying to model are drupal-based. We aren't dealing with plain static HTML or PHP sites. We have the main server, which this test server is trying to mirror, and a secondary project server which exists to give project people limited root access to update their own code. The second

Re: [users@httpd] mod_rewrite question on directory

2019-06-11 Thread Frank
You are also grossly abusing mod_rewrite for this. It isn't needed at all. Use FallbackResource, Redirect, and separate vhosts, as Igor mentioned. On 11/06/19 01:33 AM, Igor Cicimov wrote: > Since you already have two separate domains why not use virtual hosts > each with it's own document root?

Re: [users@httpd] mod_rewrite question on directory

2019-06-10 Thread Igor Cicimov
Since you already have two separate domains why not use virtual hosts each with it's own document root? IC On Tue, Jun 11, 2019, 9:18 AM Jim Weill wrote: > We have a test server, with test sites that are in two different branches > of development, but essentially the same base content. They li

[users@httpd] mod_rewrite question on directory

2019-06-10 Thread Jim Weill
We have a test server, with test sites that are in two different branches of development, but essentially the same base content. They live at /x/y/z/testsite and /x/y/z/test-site. We have other sites such as wikis and one-offs which need to stay online on our production server, and I have been te

[users@httpd] mod_rewrite or reverse proxy?

2018-06-05 Thread Ray Jender
So, I have an Ubuntu 16.04 server (host) with Apache 2.4.18 I have created 4 LXD containers on this server. Each container has media server app installed. I want to be able to access a container based on the input query. So if I browse to http:// "host server"/LPC1, I acce

Re: [users@httpd] mod_rewrite + proxy + unix socket results in 400 bad request

2017-09-05 Thread Daniel
IIRC it was by design yes, but I don't know the reasons behind it, perhaps the dev mailing list or some developers reading this can provide more information. You could also try #httpd-dev at Freenode. I think you could reach your goals without using captured groups though, I see in the initial vir

Re: [users@httpd] mod_rewrite + proxy + unix socket results in 400 bad request

2017-09-04 Thread David Mugnai
Excerpts from Daniel's message of settembre 1, 2017 9:57 : AFAIK you can't use variables of captured groups when using sockets, but I don't have an answer to why. To check If I'm correct you could try using a tcp port instead of socket. You are right, switching the test environment to tcp works

Re: [users@httpd] mod_rewrite + proxy + unix socket results in 400 bad request

2017-09-01 Thread Daniel
AFAIK you can't use variables of captured groups when using sockets, but I don't have an answer to why. To check If I'm correct you could try using a tcp port instead of socket. 2017-08-31 18:06 GMT+02:00 David Mugnai : > Excerpts from Luca Toscano's message of agosto 31, 2017 1:55 : > >> Hi David

Re: [users@httpd] mod_rewrite + proxy + unix socket results in 400 bad request

2017-08-31 Thread David Mugnai
Excerpts from Luca Toscano's message of agosto 31, 2017 1:55 : Hi David, 2017-08-29 17:41 GMT+02:00 David Mugnai : Hi, I'm trying to configure a virtual host that, based on the host name, forwards the request on a backend server listening on an unix socket. My apache version is 2.4.18 as shi

Re: [users@httpd] mod_rewrite + proxy + unix socket results in 400 bad request

2017-08-31 Thread Luca Toscano
Hi David, 2017-08-29 17:41 GMT+02:00 David Mugnai : > Hi, > > I'm trying to configure a virtual host that, based on the host name, > forwards the request on a backend server listening on an unix socket. > > My apache version is 2.4.18 as shipped by Ubuntu 16.04 > > The configuration I've tried so

[users@httpd] mod_rewrite + proxy + unix socket results in 400 bad request

2017-08-29 Thread David Mugnai
Hi, I'm trying to configure a virtual host that, based on the host name, forwards the request on a backend server listening on an unix socket. My apache version is 2.4.18 as shipped by Ubuntu 16.04 The configuration I've tried so far is: ServerAdmin webmaster@localhost DocumentR

[users@httpd] mod_rewrite behavior when port is specified

2017-03-06 Thread Paul Schroeder
Hello.. I'm seeing an issue where mod_rewrite seems to behave differently when the client connects to my VirtualHost and includes the port as a part of the URL. i.e. http://xenial.localdomain vs. http://xenial.localdomain:80 With this RewriteRule, the redirection that I want (to my SSL VirtualH

Re: [users@httpd] mod_rewrite - Setting Environment Variables

2017-02-04 Thread Nigel Peck
On 04/02/2017 07:40, Eric Covener wrote: Internal redirects, which happen for almost any substitution in htaccess rewritees, cause existing environment variables to be renamed to REDIRECT_$varname. Thanks Eric. - To unsubscrib

Re: [users@httpd] mod_rewrite - Setting Environment Variables

2017-02-04 Thread Eric Covener
On Sat, Feb 4, 2017 at 2:03 AM, Nigel Peck wrote: > What is going on? Am I missing something? Surely an environment variable > should not disappear again on the next iteration. Internal redirects, which happen for almost any substitution in htaccess rewritees, cause existing environment variable

[users@httpd] mod_rewrite - Setting Environment Variables

2017-02-03 Thread Nigel Peck
Hi, I am having trouble with how mod_rewrite handles environment variables that are set with the [E=VAR:VAL] flag for RewriteRule. I am setting an environment variable to prevent a loop. The logs show it is set, and then matched, but then on the subsequent iteration of the rules it is no lon

Re: [users@httpd] mod_rewrite bug fix question

2016-11-04 Thread Riemer Palstra
Hi John, On Mon, Oct 31, 2016 at 4:38 PM, Rose, John B wrote: > It looks like this bug was fixed in Apache 2.4.9 > > > > https://bz.apache.org/bugzilla/show_bug.cgi?id=53929 > > > > Red Hat 7 latest yum repository version is Apache 2.4.6 > > > > What are the options, if any, to address this bug

Re: [users@httpd] mod_rewrite bug fix question

2016-11-04 Thread Rich Bowen
On 10/31/2016 11:38 AM, Rose, John B wrote: > It looks like this bug was fixed in Apache 2.4.9 > > > > https://bz.apache.org/bugzilla/show_bug.cgi?id=53929 > > > > Red Hat 7 latest yum repository version is Apache 2.4.6 > > > > What are the options, if any, to address this bug in Red

[users@httpd] mod_rewrite bug fix question

2016-10-31 Thread Rose, John B
It looks like this bug was fixed in Apache 2.4.9 https://bz.apache.org/bugzilla/show_bug.cgi?id=53929 Red Hat 7 latest yum repository version is Apache 2.4.6 What are the options, if any, to address this bug in Red Hat 7 utilizing the repository provided Apache Thanks for your time

Re: [users@httpd] mod_rewrite — general exemption

2016-07-15 Thread Felipe Gasper
> > On 15 Jul 2016, at 3:11 PM, Felipe Gasper wrote: >> >> Hi all, >> >> The following rules: >> >> --- >> RewriteRule ^never-redirect - [L] >> >> RewriteRule ^(.*) http://target-domain.com/$1 >> --- >> >> … don’t work for what I want; i.e., a “black-list” of URLs that s

Re: [users@httpd] mod_rewrite — general exemption

2016-07-15 Thread Felipe Gasper
On 15 Jul 2016, at 3:11 PM, Felipe Gasper wrote: > > Hi all, > > The following rules: > > --- > RewriteRule ^never-redirect - [L] > > RewriteRule ^(.*) http://target-domain.com/$1 > --- > > … don’t work for what I want; i.e., a “black-list” of URLs that should never > r

[users@httpd] mod_rewrite — general exemption

2016-07-15 Thread Felipe Gasper
Hi all, The following rules: --- RewriteRule ^never-redirect - [L] RewriteRule ^(.*) http://target-domain.com/$1 --- … don’t work for what I want; i.e., a “black-list” of URLs that should never redirect. Is it possible to implement something like this using mod_rewrite

[users@httpd] mod_rewrite, scopes and inheritance

2016-05-30 Thread Falco Schwarz
Hi there, I have a question regarding the inheritance of RewriteRules from different scopes. So, I have the following setup: httpd.conf: - several blocks, including the following: AllowOverride None OptionsFollowSymLinks Requireall granted R

[users@httpd]mod_rewrite HTTP_COOKIE

2015-12-09 Thread Motty
help mod_write Hello All, I need to authenticate users before allow to view website. using Apache2.4 if users don't have web_route they will be redirected. The condition & rule works but then Joomla URL don't work. Can someone please help? Options Indexes FollowSymLinks Options ALL -Indexe

Re: [users@httpd] mod_rewrite

2015-10-13 Thread Yann Ylavic
Hello, On Tue, Oct 13, 2015 at 12:27 AM, Earl Terwilliger wrote: > > if I want to block anyone manually typing in a link (no referer) + > hotlinking (probably has a referer). Do i need the [OR] on the 1st > RewriteCond and not the 2nd one? It seems to work with OR on both > conditions. If you wa

Re: [users@httpd] mod_rewrite

2015-10-12 Thread Kurtis Rader
On Mon, Oct 12, 2015 at 3:27 PM, Earl Terwilliger wrote: > I am a bit confused about the mod_rewrite documentation. It shows this > rule to block hotlinking: > > RewriteCond "%{HTTP_REFERER}" "!^$" > RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC] > RewriteRule "\.(gif|jpg|png)$""-" [

[users@httpd] mod_rewrite

2015-10-12 Thread Earl Terwilliger
Hi, I am a bit confused about the mod_rewrite documentation. It shows this rule to block hotlinking: RewriteCond "%{HTTP_REFERER}" "!^$" RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC] RewriteRule "\.(gif|jpg|png)$""-" [F,NC] however, I'd think a better rule would be: RewriteCond "%

Re: [users@httpd] mod_rewrite for multiple unknown directories question

2015-08-14 Thread Rich Bowen
Pardon me for answering a question with a question, but is it possible to just move the directory that you're pointing to to remove this confusion? That is, I assume that the URL /user1 is Aliased to /home/user1/ somewhere in your configuration. Can you alias it to /home/user1/assets instead a

[users@httpd] mod_rewrite for multiple unknown directories question

2015-08-13 Thread Rose, John B
Hello We are trying to create a RewriteRule that will allow us to drop a component of the actual URL, and still reference the content deeper in the directory structure for any number of subdirectories to that dropped component of the URL. For example let's say the content for each account is in

Re: [users@httpd] mod_rewrite is ignored or disabled

2015-06-29 Thread James Moe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/29/2015 02:08 AM, Zimmi wrote: > I would say the problem now is that your rewrite in .htaccess > *overrides *the rewrite in the Directory section of the VHost. > Yes, that was it. You are very sharp. Thank you! I moved the rewrite from vhost

Re: [users@httpd] mod_rewrite is ignored or disabled

2015-06-29 Thread Zimmi
Le 29.06.2015 03:18, James Moe a écrit : -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/28/2015 03:02 PM, Zimmi wrote: There are in your .htaccess file 2 instructions "RewriteEngine": the first states "on", the second states "off". They are around your rewrite rules, so I try to guess that

Re: [users@httpd] mod_rewrite is ignored or disabled

2015-06-28 Thread James Moe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/28/2015 03:02 PM, Zimmi wrote: > There are in your .htaccess file 2 instructions "RewriteEngine": > the first states "on", the second states "off". They are around > your rewrite rules, so I try to guess that you meant to switch the > rewrite en

Re: [users@httpd] mod_rewrite is ignored or disabled

2015-06-28 Thread Kurtis Rader
On Sun, Jun 28, 2015 at 3:02 PM, Zimmi wrote: > There are in your .htaccess file 2 instructions "RewriteEngine": the first > states "on", the second states "off". They are around your rewrite rules, > so I try to guess that you meant to switch the rewrite engine on, do the > rewrite, and then sw

Re: [users@httpd] mod_rewrite is ignored or disabled

2015-06-28 Thread Zimmi
Hi, There are in your .htaccess file 2 instructions "RewriteEngine": the first states "on", the second states "off". They are around your rewrite rules, so I try to guess that you meant to switch the rewrite engine on, do the rewrite, and then switch it off. But, afaik the last instruction wi

[users@httpd] mod_rewrite is ignored or disabled

2015-06-28 Thread James Moe
Hello, httpd v2.4.10 linux v3.16.7-21-desktop x86_64 I am consolidating a discussion started in message "ReDirect question". The issue there is that mod_rewrite is simply ignored. Below are the contents of .htaccess and vhost. In both .htaccess and vhost the Rewrite* directive are simply i

Re: [users@httpd] mod_rewrite vs. mod_jk

2015-05-10 Thread Rainer Jung
Am 06.05.2015 um 11:16 schrieb Hajo Locke: Hello, i have a small mod_jk.conf and want to use mod_rewrite also: JkMount /* ajp13 JkUnmount /test/* ajp13 RewriteEngine On RewriteRule ^/$ /java_app/ [L] Rewriting by mod_rewrite only works with urls which are unmounted by JkUnmount. So above Rule

[users@httpd] mod_rewrite vs. mod_jk

2015-05-06 Thread Hajo Locke
Hello, i have a small mod_jk.conf and want to use mod_rewrite also: JkMount /* ajp13 JkUnmount /test/* ajp13 RewriteEngine On RewriteRule ^/$ /java_app/ [L] Rewriting by mod_rewrite only works with urls which are unmounted by JkUnmount. So above Rule is not working because its immediately pass

Re: [users@httpd] mod_rewrite does not respect env HTTPS

2015-02-26 Thread Eric Covener
On Thu, Feb 26, 2015 at 11:25 AM, zBit wrote: > RewriteCond %{HTTPS} =on > > Is there any workaround for this? So far, I tried to disable mod_ssl > completely and also checked modules hooks and it seems that > environment files are loaded before the rewrite module. %{HTTPS} does not look up an e

[users@httpd] mod_rewrite does not respect env HTTPS

2015-02-26 Thread zBit
Hello everyone! I have Apache SSL virtuals behind the Nginx proxy defined with this directive: SetEnvIf X-Forwarded-Proto https HTTPS=on Users often use the following rewrite rule in their htaccess files for detecting SSL connection, but the variable HTTPS is not treated as expected: RewriteCon

[users@httpd] mod_rewrite with mod_proxy removes the query string (Apache 2.2.2 - Debian)

2015-02-09 Thread Charles Le Gallic
Hello all, I'm trying to setup a reverse proxy configuration based on query string rewriting with Apache2, mod_rewrite, mod_proxy (and also mod_auth_cas, but I don't think it deals with my problem). The request flow : browser --> first Apache HTTPD (--> mod_rewrite --> mod_auth_cas --> mod_rewri

[users@httpd] mod_rewrite use case

2014-11-17 Thread Rajalakshmi Iyer
Hello, I have an Apache module based application server (A) that handles requests. Some of these requests based on a cache hit / miss need to go to another server (B) to be handled. Would this make a use case for mod_rewrite / mod_proxy where we forward the requests to another server (B) based on

Re: [users@httpd] Mod_Rewrite with Location Directive

2014-10-28 Thread Eric Covener
Internally, here's what apache is doing when mod_rewrite makes a per-dir subsutiton. This might explain a little better the sequence is Receive a request for /foo Merge instead of to configure the expires/headers. mod_headers also directly supports expressions or env= but mod_expires does not

Re: [users@httpd] Mod_Rewrite with Location Directive

2014-10-28 Thread Stefan Schreier
Sent with AquaMail for Android http://www.aqua-mail.com On October 28, 2014 5:06:54 PM John Mark Mitchell wrote: All, I have worked with Apache for well over a decade now and have come to understand that there is usually more than one way to accomplish desired outcomes. I have been trying

[users@httpd] Mod_Rewrite with Location Directive

2014-10-28 Thread John Mark Mitchell
All, I have worked with Apache for well over a decade now and have come to understand that there is usually more than one way to accomplish desired outcomes. I have been trying for a couple of weeks to troubleshoot something that I thought at first would be a simple conf error or mis-use of a m

[users@httpd] mod_rewrite issue – what do the log files say?

2014-07-15 Thread fooness
Hello users! I have an account on a shared server and the company told me that there is absolutey no way I can see the access logs. Being just a user, I never set up a webserver. I tried the htacces tester, though there is no support of the SERVER_NAME variable. http://htaccess.madewithlove.be/

Re: [users@httpd] mod_rewrite RewriteCond

2014-06-27 Thread Pete Houston
You can set up a reverse proxy and include access control like this: LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so ProxyRequests Off ServerName reverse-proxy.example.com allow from 1.2.3.4 2.2.3.4

[users@httpd] R: Re: [users@httpd] mod_rewrite RewriteCond

2014-06-27 Thread Michele De Santis
Thanks Pete, I was using mod_rewrite in block. Apache works like a reverse-proxy. Is there a way to insert more IP? Thanks for your advise. Michael Messaggio originale Da: p...@openstrike.co.uk Data: 27-giu-2014 11.55 A: , "Michele De Santis" Ogg: Re: [users@httpd] m

Re: [users@httpd] mod_rewrite RewriteCond

2014-06-27 Thread Pete Houston
Hello Michael, The obvious question is why are you using mod_rewrite for access control in the first place? There are other, lighter modules whose purpose actually is access control and which will allow you to use CIDR notation etc. I suggest you take a look at mod_authz_host instead. Pete -- O

[users@httpd] mod_rewrite RewriteCond

2014-06-27 Thread Michele De Santis
Hi to all, I'm working with apache 2.2.3-22 and I want to allow access a certain IP address. These IP are consecutive x.x.x.232 x.x.x.233 in my httpd.conf I'm using RewriteCond %{REMOTE_ADDR} !x\.x\.x\.23[23]$ [NC]RewriteRule \.*$ - [F,NC] or RewriteCond %{REMOTE_ADDR} !x\.x\.x\.23[2-3]$ [NC]R

Re: [users@httpd] mod_rewrite help request

2014-04-01 Thread James Moe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/01/2014 06:48 PM, Michael Streeter wrote: > Try this: RewriteEngine on RewriteCond %{QUERY_STRING} page=(.*) > RewriteRule ^(.*)$ http://www.example.com/%1? [R,L] > Thank you. That worked a peach. - -- James Moe moe dot james at sohnen-moe

Re: [users@httpd] mod_rewrite help request

2014-04-01 Thread Michael Streeter
On 4/1/2014 1:15 PM, James Moe wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I have changed the way a website refers to page in the URL. The old method was odd, useless and unnecessarily complicated. I wish to have rewrite rule that changes http://www.example.com/?page=somep

[users@httpd] mod_rewrite help request

2014-04-01 Thread James Moe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I have changed the way a website refers to page in the URL. The old method was odd, useless and unnecessarily complicated. I wish to have rewrite rule that changes http://www.example.com/?page=somepage.php to http://www.example.com/somepage

Re: [users@httpd] mod_rewrite redirect to login page

2014-03-04 Thread Rich Bowen
On 03/04/2014 03:12 PM, Keith Lawson wrote: >I suspect that you might be able to do the same thing with > >ErrorDocument 403https://sso.lhsc.on.ca/signauto/in > >and avoid the convolutions of mod_rewrite here. Assuming your in-house >mod_perl auth handler returns a 403 on auth failure. Actua

Re: [users@httpd] mod_rewrite redirect to login page

2014-03-04 Thread Keith Lawson
>>> On 2014/03/04 at 10:44 AM, in message <5315f4db.8020...@rcbowen.com>, Rich Bowen wrote: > On 03/03/2014 05:40 PM, Keith Lawson wrote: >> Hello, >># Redirect to pass through authentication if internal >># >>RewriteCond %{REMOTE_ADDR} ^10\..*$ >>RewriteCond %{LA-U:REMOTE_USER}

Re: [users@httpd] mod_rewrite redirect to login page

2014-03-04 Thread Rich Bowen
On 03/03/2014 05:40 PM, Keith Lawson wrote: Hello, # Redirect to pass through authentication if internal # RewriteCond %{REMOTE_ADDR} ^10\..*$ RewriteCond %{LA-U:REMOTE_USER} !(.+) RewriteRule ^/kltest/env$ https://sso.lhsc.on.ca/signauto/in [NS] # Redirect to manual authentica

[users@httpd] mod_rewrite redirect to login page

2014-03-03 Thread Keith Lawson
Hello, I'm attempting to set up a site with a mixture of mod_auth_kerb and an in house mod_perl2 auth handler we wrot. Basically what I need to do is when you hit the root of the site if "REMOTE_USER" isn't populated and you're on the LAN redirect to a page under mod_auth_kerb that sets a tic

Re: [users@httpd] mod_rewrite help, # in input url

2014-01-21 Thread Eric Covener
On Tue, Jan 21, 2014 at 4:02 PM, Ayub Khan wrote: > Thank you for the reply. I want to match the text which is follows # and > grab a substring from it. Not sure if its possible with mod_rewrite ? Have a look at the access log. You'll notice that anything after the # isn't actually sent with th

Re: [users@httpd] mod_rewrite help, # in input url

2014-01-21 Thread Yehuda Katz
It is not possible. The string after the `#` is NEVER sent to the server (that is because of the way the browser works and there is nothing the server can do about it). The ONLY way to send it to the server would be to have some client-side scripting that captures and sends it as a real query stri

Re: [users@httpd] mod_rewrite help, # in input url

2014-01-21 Thread Ayub Khan
Thank you for the reply. I want to match the text which is follows # and grab a substring from it. Not sure if its possible with mod_rewrite ? /share/page/repositry/path#filter=xyz%2C%2Fn3%2FUSER%20HOMES%2Fn3%2Fn3555&page=1 >From the above url, I nee to redirect to /share/page/MyFiles&page=1 p

Re: [users@httpd] mod_rewrite help, # in input url

2014-01-21 Thread Rich Bowen
On 01/17/2014 12:49 PM, Ayub Khan wrote: Could some one assist me with creating a rewrite rule in httpd 2.2.4? http://localhost:8080/share/page/repository#filter=path%7C%2FUser%25Homes%2F<2ALFANUMERIC>%2F%2F%7C&page=1 http://localhost:8080/share/page/context/mine/myfiles#filter=path%2F<2ALFAN

Re: [users@httpd] mod_rewrite url has pound (#) symbol

2014-01-20 Thread Yehuda Katz
The part of the URL after the # is not sent to the server, so it is not possible to match on it. Anyway, if you just remove it from your pattern, you should get the same result since you do not appear to be trying to match on anything after it. - Y Sent from a gizmo with a very small keyboard and

[users@httpd] mod_rewrite url has pound (#) symbol

2014-01-18 Thread Ayub Khan
My url has # in the url. Could some one suggest how to use this to redirect. I do not have control over how the url is being generated as its a software product. The below rule does not seem to work. RewriteRule^(/share/page/repository#)$ /share/page/context/mine/myfiles [B,R] I tried to e

[users@httpd] mod_rewrite help, # in input url

2014-01-17 Thread Ayub Khan
Could some one assist me with creating a rewrite rule in httpd 2.2.4? http://localhost:8080/share/page/repository#filter=path%7C%2FUser%25Homes%2F <2ALFANUMERIC>%2F%2F%7C&page=1 http://localhost:8080/share/page/context/mine/myfiles#filter=path%2F <2ALFANUMERIC>/%2F Below is sample: http://loca

Re: [users@httpd] mod_rewrite config (UNCLASSIFIED)

2013-12-11 Thread Nick Tkach
UNCLASSIFIED > Caveats: FOUO > > Use redirect instead: > > http://httpd.apache.org/docs/current/rewrite/avoid.html > > > Nick > > > -Original Message- > From: Jonathan-Marc Lapointe [mailto:jmlapoi...@ccdmd.qc.ca] > Sent: Wednesday, December 11, 2013 2:25

RE: [users@httpd] mod_rewrite config (UNCLASSIFIED)

2013-12-11 Thread Folino, Nick E CTR USARMY HRC (US)
: [users@httpd] mod_rewrite config Hi, I'd like to redirect all traffic going to https://www.mywebsite.com to https://store.mywebsite.com instead. But I want traffic going to http://www.mywebsite.com to be left alone. I tried with the following config: RewriteEngine On RewriteCond %{HTTP

[users@httpd] mod_rewrite config

2013-12-11 Thread Jonathan-Marc Lapointe
Hi, I'd like to redirect all traffic going to https://www.mywebsite.com to https://store.mywebsite.com instead. But I want traffic going to http://www.mywebsite.com to be left alone. I tried with the following config: RewriteEngine On

[users@httpd] mod_rewrite and Short URLs in mediawiki

2013-09-08 Thread Yan Seiner
I have an installation of apache 2.2 (Ubuntu 12.04LTS) and mediawiki 1.21. I am trying to get short URLs working. I've configured mod-rewrite before on other systems and I can't find anything wrong with any of the various setups I've tried, but mod_rewrite is being silently ignored. Here's my m

Re: [users@httpd] mod_rewrite question

2013-08-08 Thread Eric Covener
On Thu, Aug 8, 2013 at 8:20 PM, Noah Duffy wrote: > On Aug 8, 2013, at 7:12 PM, wrote: > >> I have the following URL that is no longer valid >> https://cms.example.com/enterprise/registration/browserinstructions.jsp?productID=100 >> and I have beat myself silly trying to get it to redirect to t

RE: [users@httpd] mod_rewrite question

2013-08-08 Thread Ward.P.Fontenot
My bad, this is a site that uses a fair amount of simple rewrite rules and they are all working correctly. -Original Message- From: Noah Duffy [mailto:noahdu...@fastmail.fm] Sent: Thursday, August 08, 2013 5:20 PM To: users@httpd.apache.org Subject: Re: [users@httpd] mod_rewrite question

Re: [users@httpd] mod_rewrite question

2013-08-08 Thread Noah Duffy
On Aug 8, 2013, at 7:12 PM, wrote: > I have the following URL that is no longer valid > https://cms.example.com/enterprise/registration/browserinstructions.jsp?productID=100 > and I have beat myself silly trying to get it to redirect to the new correct > URL > https://cms.example.com/enterpri

[users@httpd] mod_rewrite question

2013-08-08 Thread Ward.P.Fontenot
I have the following URL that is no longer valid https://cms.example.com/enterprise/registration/browserinstructions.jsp?prod uctID=100 and I have beat myself silly trying to get it to redirect to the new correct URL https://cms.example.com/enterprise/registration/InternalPersonalCertificates .do?d

[users@httpd] Mod_rewrite END flag does not work for directory index

2013-07-27 Thread Joyce Babu
The END flag for mod_rewrite in Apache 2.4 does not appear to be working correctly. I have a directory named test with a file test.html. I have placed an .htaccess file in the directory with the following content RewriteEngine on RewriteRule ^test$ test.html [NC,QSA,END] RewriteRule ^$ test.html

[users@httpd] mod_rewrite and FollowSymlinks

2013-04-29 Thread Markus Falb
Hi, In the documentation [1] I read To enable the rewrite engine in this context, you need to set "RewriteEngine On" and "Options FollowSymLinks" must be enabled. If your administrator has disabled override of FollowSymLinks for a user's directory, then you cannot use the rewrite engine. This rest

[users@httpd] [mod_rewrite] uri '*' passing through all the rules

2013-03-24 Thread Nicolas Peltier
Hi, Has someone already have the experience of getting all its URIs deeper than / being treated by mod_rewrite as '*' (which basically doesn't match any of my rules afterward), e.g. : GET /test.html init rewrite engine with requested uri * applying pattern '^/$' to uri '*' applying pattern '^/li

[users@httpd] mod_rewrite, APR_HOOK_MIDDLE, and HTTP response headers

2013-03-13 Thread jc
Hi all, I am using apache 2.2.22 and an in-house apache module, which contains a hook that sets an HTTP response header. That hook is registered with APR_HOOK_MIDDLE: mod_ourmodule.c: ap_hook_thing(thing, NULL, NULL, APR_HOOK_MIDDLE); This normally works, but if the request is rewritten interna

[users@httpd] mod_rewrite pause for 2500ms

2013-03-12 Thread Oyvind Eriksen
I'm running Apache 2.4.4 Win32 on a Windows 2008 server. When trying to optimize a website I noticed a random reoccurring 2500ms delay in Time To First Byte. A file could have a TTFB of 500ms several times but suddenly it would get 3000ms. This could be a static file (image, html, js) or php. A

RE: [users@httpd] mod_rewrite Question

2012-12-29 Thread Martin, Stanley G
Dec/2012:09:43:15 --0600] [ckcftpa2/sid#26c828][rid#61623f0/initial] (1) [perdir E:/cmdbnew/] pass through E:/cmdbnew/USDADPRTSPW01 From: Akash Jain [mailto:akash.delh...@gmail.com] Sent: Friday, December 28, 2012 10:40 PM To: users@httpd.apache.org Subject: Re: [users@httpd] mod_rewrite Question R

Re: [users@httpd] mod_rewrite Question

2012-12-28 Thread Igor Cicimov
r Team | Outsourcing Services >> >> >> ** ** >> >> Capgemini "US" | KCSC Service Center >> >> Tel.: (816) 347-7692 – Mob.: (816) 284-7415 >> >> www.capgemini.com >> >> ** ** >> >> 777 NW Blue Pkwy >> >> Lee's Summit, MO64086 >> >> *People matter, results

Re: [users@httpd] mod_rewrite Question

2012-12-28 Thread Akash Jain
*People matter, results count.*** > > ___________*** > * > > ** ** > > *From:* Igor Cicimov [mailto:icici...@gmail.com] > *Sent:* Friday, December 28, 2012 10:19 PM > *To:* users > *Subject:* Re: [users@httpd] mod_r

RE: [users@httpd] mod_rewrite Question

2012-12-28 Thread Martin, Stanley G
_ From: Igor Cicimov [mailto:icici...@gmail.com] Sent: Friday, December 28, 2012 10:19 PM To: users Subject: Re: [users@httpd] mod_rewrite Question On 29/12/2012 3:12 PM, "Martin, Stanley G" mailto:stanley.mar...@capgemini.com>> wrote: > > I have been banging my

Re: [users@httpd] mod_rewrite Question

2012-12-28 Thread Igor Cicimov
On 29/12/2012 3:12 PM, "Martin, Stanley G" wrote: > > I have been banging my head against the wall on this and when I think I finally have it, it doesn’t work. I’ve been able to get some basic stuff to work like: > > > > Setting DirectoryIndex > > And doing a simple redirect. > > > > But, what I

[users@httpd] mod_rewrite Question

2012-12-28 Thread Martin, Stanley G
I have been banging my head against the wall on this and when I think I finally have it, it doesn't work. I've been able to get some basic stuff to work like: Setting DirectoryIndex And doing a simple redirect. But, what I really want to do is make the URI cleaner so that the users don't see t

[users@httpd] mod_rewrite infinite loop

2012-12-19 Thread Stratsimir Kolchevski
Hi list, I discovered that a misconfigured mod_rewrite rule could cause the apache web server (2.2.23 and 2.4.3) to fall into an infinite loop and eat all of the available memory, until killed by the OOM killer: Put the following lines in .htaccess file: RewriteEngine On RewriteRule .* a [N]

Re: [users@httpd] mod_rewrite racing condition problem ?

2012-10-24 Thread Søren Schrøder
On Wed, Oct 24, 2012 at 5:17 PM, Jeff Trawick wrote: > You left one out: > > http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritelock And right you are. Tested, Verified. Works like a charm! -- Søren Schrøder. Obey Gravity - It's the law !

Re: [users@httpd] mod_rewrite racing condition problem ?

2012-10-24 Thread Jeff Trawick
On Wed, Oct 24, 2012 at 10:35 AM, Søren Schrøder wrote: > Greetings apache users - I hope I selected the right list for this question: > > > I have a wierd mod_rewrite problem, that I need new eyes on. > > What I try to do accomplish: > > I am implementing “Userdirs” using mod_rewrite, with users

  1   2   3   >