Re: [EMAIL PROTECTED] mod_rewrite subrequests or last rules within Directory

2008-11-26 Thread Peter Kehl
Eric, thank you. Now I see it's mentioned at http://httpd.apache.org/docs/2.0/rewrite/rewrite_tech.html mentions that 'in per-directory context mod_rewrite first rewrites the filename... and then initiates a new internal sub-request with the new URL. This restarts processing of the API phases.'

[EMAIL PROTECTED] mod_rewrite proxiing is extremly slow

2008-11-26 Thread Berthold Höllmann
pgpckuYkeBtBs.pgp Description: PGP signature

Re: [EMAIL PROTECTED] mod_rewrite subrequests or last rules within Directory

2008-11-26 Thread Eric Covener
rewriter log says it rewrites to /index.php first (1st rule) and then it rewrites it to /set_cookie.php (2nd rule). I thought [L] and [NS] should stop any further rules. What am I missing? In per-directory context, any time you make a change the entire cycle is restarted -- 'L' only applies to

[EMAIL PROTECTED] mod_rewrite subrequests or last rules within Directory

2008-11-26 Thread Peter Kehl
Hi. My goal was: if URI contains cuckoo, no matter what cookies, then show /index.php. Otherwise if the user hasn't got BREEZESESSION cookie set, then show /set_cookie.php. I've got it working inside VirtualHost but outside Directory: VirtualHost *:80 ServerAdmin [EMAIL PROTECTED]

[EMAIL PROTECTED] mod_rewrite: get current working directory

2008-11-25 Thread Dennis Birkholz
Hello together, I want to create a rule, that maps /images/xyz.png to /foo/images/xyz.png (if that file exists), otherwise to /bar/images/xyz.png. My problem is that i cannot get the current working directory to test if file /foo/... exists because mod_rewrite wants absolute pathnames only,

Re: [EMAIL PROTECTED] mod_rewrite: get current working directory

2008-11-25 Thread André Warnier
Dennis Birkholz wrote: Hello together, I want to create a rule, that maps /images/xyz.png to /foo/images/xyz.png (if that file exists), otherwise to /bar/images/xyz.png. My problem is that i cannot get the current working directory to test if file /foo/... exists because mod_rewrite wants

Re: [EMAIL PROTECTED] mod_rewrite rule

2008-11-05 Thread Eric Covener
On Wed, Nov 5, 2008 at 5:46 AM, André Warnier [EMAIL PROTECTED] wrote: I mean, before Apache even gets to the .htaccess file, it has to find the path to the directory wher the .htaccess file is. And once it finds it, it would have to re-interpret that same path and change it. It does not seem

Re: [EMAIL PROTECTED] mod_rewrite rule

2008-11-05 Thread Krist van Besien
On Wed, Nov 5, 2008 at 11:46 AM, André Warnier [EMAIL PROTECTED] wrote: On the other hand, in the Apache 2.2 mod_rewrite on-line help, there is this paragraph : RewriteRule can be used in per-directory config files (.htaccess). In such a case, it will act locally, stripping the local

Re: [EMAIL PROTECTED] mod_rewrite rule

2008-11-05 Thread André Warnier
Eric Covener wrote: On Tue, Nov 4, 2008 at 4:16 PM, Seb [EMAIL PROTECTED] wrote: Hi, I'm having trouble specifying a seemingly very simple rewrite rule in .htaccess, where I simply want to redirect from say http://some.host.com/path to http://some.host.com/Path, and any subdirectories of

Re: [EMAIL PROTECTED] mod_rewrite rule

2008-11-05 Thread Robert T Wyatt
Yes, in a community with 70,000 users and millions of hits a day, the admins don't like every department to have access to httpd.conf. Eric Covener wrote: On Wed, Nov 5, 2008 at 5:46 AM, André Warnier [EMAIL PROTECTED] wrote: I mean, before Apache even gets to the .htaccess file, it has to find

Re: [EMAIL PROTECTED] mod_rewrite rule

2008-11-05 Thread André Warnier
Robert T Wyatt wrote: Yes, in a community with 70,000 users and millions of hits a day, the admins don't like every department to have access to httpd.conf. :-) Ok, I can understand them. Although one could wonder, then, why they allow .htaccess files anyway. I believe said departments could

[EMAIL PROTECTED] mod_rewrite rule

2008-11-04 Thread Seb
Hi, I'm having trouble specifying a seemingly very simple rewrite rule in .htaccess, where I simply want to redirect from say http://some.host.com/path to http://some.host.com/Path, and any subdirectories of course. I thought this would do it: RewriteRule ^path(.*)$ /Path$1 [last] but it

Re: [EMAIL PROTECTED] mod_rewrite rule

2008-11-04 Thread Eric Covener
On Tue, Nov 4, 2008 at 4:16 PM, Seb [EMAIL PROTECTED] wrote: Hi, I'm having trouble specifying a seemingly very simple rewrite rule in .htaccess, where I simply want to redirect from say http://some.host.com/path to http://some.host.com/Path, and any subdirectories of course. I thought this

[EMAIL PROTECTED] mod_rewrite behaving differently on different apache servers. What to do?

2008-11-03 Thread JimRaynor
As part of SEO optimization, I use this code in my .htaccess file : RewriteEngine On RewriteRule ^some/(.*)/(.*).html$ some.php?reqa=$1reqb=$2 This code should rewrite this link: some/valuea/valueb.html into this: some.php?reqa=valueareqb=valueb I tried this on several apache servers.

Re: [EMAIL PROTECTED] mod_rewrite behaving differently on different apache servers. What to do?

2008-11-03 Thread Krist van Besien
On Mon, Nov 3, 2008 at 2:09 PM, JimRaynor [EMAIL PROTECTED] wrote: I tried this on several apache servers. On some it works perfectly. On some it doesn't work at all. And on some it rewrites first part of the link, but not query string (part after ? ) . How to configure Apache for this to

[EMAIL PROTECTED] mod_rewrite prg option not working

2008-10-20 Thread System Support
I am having trouble getting the external program option of RewriteMap to work. RewriteMap convert rnd:/path/to/rnd/file and RewriteMap convert txt:/path/to/txt/file both work as expected. RewriteMap convert prg:/path/to/prg/file does not work, and the program does not even seem to be called.

Re: [EMAIL PROTECTED] mod_rewrite(?) for redirect to another URL

2008-10-16 Thread Krist van Besien
On Thu, Oct 16, 2008 at 2:28 PM, ampo [EMAIL PROTECTED] wrote: Hello. I have client who turn to Server1. Server1 send xmlHTTPRequest Server2 (another domain - cross domain). Server2 should response with XML back to client (through Server1). Who can I do this to avoide the security problem?

[EMAIL PROTECTED] mod_rewrite(?) for redirect to another URL

2008-10-16 Thread ampo
Hello. I have client who turn to Server1. Server1 send xmlHTTPRequest Server2 (another domain - cross domain). Server2 should response with XML back to client (through Server1). Who can I do this to avoide the security problem? I read the mod_rewrite / Proxy documentation but found nothing

Re: [EMAIL PROTECTED] mod_rewrite, mod_proxy, order of execution?

2008-10-15 Thread Eric Covener
On Wed, Oct 15, 2008 at 7:25 AM, howard chen [EMAIL PROTECTED] wrote: Thanks. On Wed, Oct 15, 2008 at 7:19 PM, Eric Covener [EMAIL PROTECTED] wrote: Only where they overlap and it's before 2.2, because it's undefined as to which will run first. In 1.3 you might be able to control it by

Re: [EMAIL PROTECTED] mod_rewrite, mod_proxy, order of execution?

2008-10-15 Thread Eric Covener
On Wed, Oct 15, 2008 at 7:07 AM, howard chen [EMAIL PROTECTED] wrote: Hello, On Wed, Oct 15, 2008 at 6:49 PM, Eric Covener [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 4:47 AM, howard chen [EMAIL PROTECTED] wrote: Seems that Rewrite is done after the proxy? How to control the order then?

Re: [EMAIL PROTECTED] mod_rewrite, mod_proxy, order of execution?

2008-10-15 Thread Eric Covener
On Wed, Oct 15, 2008 at 4:47 AM, howard chen [EMAIL PROTECTED] wrote: Seems that Rewrite is done after the proxy? How to control the order then? in 2.2, rewrite will always happen first. In 2.0 it's unpredictable. To control the order, use RewriteRule with [P] instead of ProxyPass when it

[EMAIL PROTECTED] mod_rewrite, mod_proxy, order of execution?

2008-10-15 Thread howard chen
Hello , I have the following config in httpd.conf: my site is http://www.example.com (port 80) == RewriteEngine On RewriteRule ^/$/cgi-bin/index.cgi ProxyPass /cgi-bin/ http://www.example.com:9000/cgi-bin/ ProxyPassReverse /cgi-bin/

RE: [EMAIL PROTECTED] mod_rewrite, mod_proxy, order of execution?

2008-10-15 Thread Ashutosh.Mohanty
: [EMAIL PROTECTED] mod_rewrite, mod_proxy, order of execution? Hello , I have the following config in httpd.conf: my site is http://www.example.com (port 80) == RewriteEngine On RewriteRule ^/$/cgi-bin/index.cgi ProxyPass /cgi-bin/ http://www.example.com:9000

Re: [EMAIL PROTECTED] mod_rewrite, mod_proxy, order of execution?

2008-10-15 Thread howard chen
Thanks. On Wed, Oct 15, 2008 at 7:19 PM, Eric Covener [EMAIL PROTECTED] wrote: Only where they overlap and it's before 2.2, because it's undefined as to which will run first. In 1.3 you might be able to control it by AddModule ordering, but in 2.0 it may differ from system to system and you

Re: [EMAIL PROTECTED] mod_rewrite, mod_proxy, order of execution?

2008-10-15 Thread howard chen
Hello, On Wed, Oct 15, 2008 at 6:49 PM, Eric Covener [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 4:47 AM, howard chen [EMAIL PROTECTED] wrote: Seems that Rewrite is done after the proxy? How to control the order then? in 2.2, rewrite will always happen first. In 2.0 it's unpredictable.

Re: [EMAIL PROTECTED] mod_rewrite double escaping query strings

2008-10-03 Thread Justin Pasher
Tom Evans wrote: On Thu, 2008-10-02 at 16:41 +0100, Tom Evans wrote: Following up my own email, for the archive, the solution was to add flag NE to the RewriteRule. Cheers Tom Keeping up my monologue, adding flag NE (no-escape) is still just half a solution. For an example I created

Re: [EMAIL PROTECTED] mod_rewrite double escaping query strings

2008-10-02 Thread Tom Evans
On Wed, 2008-10-01 at 09:49 -0500, Justin Pasher wrote: Tom Evans wrote: Hi all. I'm encountering a problem with using mod_rewrite in httpd 2.2.9 to canonicalize the server name. The problem is that the query string seems to be double escaped by this process. Here is a sample vhost that

Re: [EMAIL PROTECTED] mod_rewrite double escaping query strings

2008-10-02 Thread Tom Evans
On Thu, 2008-10-02 at 09:19 +0100, Tom Evans wrote: On Wed, 2008-10-01 at 09:49 -0500, Justin Pasher wrote: Tom Evans wrote: Hi all. I'm encountering a problem with using mod_rewrite in httpd 2.2.9 to canonicalize the server name. The problem is that the query string seems to be

Re: [EMAIL PROTECTED] mod_rewrite double escaping query strings

2008-10-02 Thread Tom Evans
On Thu, 2008-10-02 at 16:41 +0100, Tom Evans wrote: Following up my own email, for the archive, the solution was to add flag NE to the RewriteRule. Cheers Tom Keeping up my monologue, adding flag NE (no-escape) is still just half a solution. For an example I created the file %.html in my

Re: [EMAIL PROTECTED] mod_rewrite double escaping query strings

2008-10-01 Thread Justin Pasher
Tom Evans wrote: Hi all. I'm encountering a problem with using mod_rewrite in httpd 2.2.9 to canonicalize the server name. The problem is that the query string seems to be double escaped by this process. Here is a sample vhost that triggers the issue: VirtualHost *:80 ServerName sweetums

Re: [EMAIL PROTECTED] mod_rewrite question

2008-09-15 Thread Justin Pasher
Alain Roger wrote: Hi, i would like to rewrite some of my pages so i have the following .htaccess file under my subfolder _sub/test/ Options +FollowSymlinks RewriteEngine on RewriteRule ^article-([0-9]+)-([0-9]+)\.php$ article.php?numero=$1page=$2 [L] i also have 1 file article.php

[EMAIL PROTECTED] mod_rewrite question

2008-09-14 Thread Alain Roger
Hi, i would like to rewrite some of my pages so i have the following .htaccess file under my subfolder _sub/test/ Options +FollowSymlinks RewriteEngine on RewriteRule ^article-([0-9]+)-([0-9]+)\.php$ article.php?numero=$1page=$2 [L] i also have 1 file article.php which only display the numero

[EMAIL PROTECTED] mod_rewrite bug/by design with mod_mem_cache cached files?

2008-09-05 Thread Anthony J. Biacco
Hi, I'm using apache 2.2.9 with mod_mem_cache to cache some javascript files, which is working fine. Today, I added a rewrite rule to forbid access (403) to everything in a virtualhost based on the Opera browser, which obviously included the javascript files. Problem is, the cached files in

RE: [EMAIL PROTECTED] mod_rewrite bug/by design with mod_mem_cache cached files?

2008-09-05 Thread Anthony J. Biacco
@httpd.apache.org Subject: Re: [EMAIL PROTECTED] mod_rewrite bug/by design with mod_mem_cache cached files? On Fri, Sep 5, 2008 at 1:20 PM, Anthony J. Biacco [EMAIL PROTECTED] wrote: Hi, I'm using apache 2.2.9 with mod_mem_cache to cache some javascript files, which is working fine. Today, I added

Re: [EMAIL PROTECTED] mod_rewrite question [FIXED]

2008-09-03 Thread Jason Pruim
On Sep 2, 2008, at 8:01 AM, Krist van Besien wrote: On Tue, Sep 2, 2008 at 13:12, Jason Pruim [EMAIL PROTECTED] wrote: Hi Everyone, Thanks for your help on this! I ended up changing my thinking a little bit and ended up doing a subdomain since I found out the server that is going to

Re: [EMAIL PROTECTED] mod_rewrite question

2008-09-02 Thread Jason Pruim
On Aug 29, 2008, at 10:10 AM, Krist van Besien wrote: On Fri, Aug 29, 2008 at 15:21, Jason Pruim [EMAIL PROTECTED] wrote: Look in to your log: It says: [127.0.0.1/sid#1802648][rid#1836238/initial] (4) RewriteCond: input='GET' pattern='^TRACE' = not-matched What exactly do you have in your

Re: [EMAIL PROTECTED] mod_rewrite question

2008-09-02 Thread Eric Covener
On Tue, Sep 2, 2008 at 6:20 AM, Jason Pruim [EMAIL PROTECTED] wrote: RewriteEngine on RewriteLog /var/log/httpd/rewrite.log RewriteLogLevel 9 RewriteRule /(.*) p.php?purl=$1 Outside of directory/location/htaccess, you have to rewrite to an absolute path,

Re: [EMAIL PROTECTED] mod_rewrite question

2008-09-02 Thread Jason Pruim
On Sep 2, 2008, at 6:54 AM, Eric Covener wrote: On Tue, Sep 2, 2008 at 6:20 AM, Jason Pruim [EMAIL PROTECTED] wrote: RewriteEngine on RewriteLog /var/log/httpd/rewrite.log RewriteLogLevel 9 RewriteRule /(.*) p.php?purl=$1 Outside of

Re: [EMAIL PROTECTED] mod_rewrite question

2008-09-02 Thread Jason Pruim
On Sep 2, 2008, at 8:01 AM, Krist van Besien wrote: On Tue, Sep 2, 2008 at 13:12, Jason Pruim [EMAIL PROTECTED] wrote: and this is my log file entry: 127.0.0.1 - - [02/Sep/2008:07:06:14 -0400] [127.0.0.1/sid#1802648][rid#1836238/initial] (2) init rewrite engine with requested uri

[EMAIL PROTECTED] mod_rewrite, L and F flags

2008-09-01 Thread Stephen Wellington
Hi, Am having trouble with mod_rewrite and would appreciate a little help. I've tried searching Google and reading the manual but found little that helps! I am trying to achieve something like this: RewriteRule ^a.php$ b.php [L] RewriteRule ^b.php$ - [F] The intention is that requests to a.php

Re: [EMAIL PROTECTED] mod_rewrite, L and F flags

2008-09-01 Thread Eric Covener
On Mon, Sep 1, 2008 at 8:01 AM, Stephen Wellington [EMAIL PROTECTED] wrote: Hi, Am having trouble with mod_rewrite and would appreciate a little help. I've tried searching Google and reading the manual but found little that helps! I am trying to achieve something like this: RewriteRule

Re: [EMAIL PROTECTED] mod_rewrite, L and F flags

2008-09-01 Thread Stephen Wellington
On Mon, Sep 1, 2008 at 1:25 PM, Eric Covener [EMAIL PROTECTED] wrote: On Mon, Sep 1, 2008 at 8:01 AM, Stephen Wellington [EMAIL PROTECTED] wrote: Hi, Am having trouble with mod_rewrite and would appreciate a little help. I've tried searching Google and reading the manual but found little

Re: [EMAIL PROTECTED] mod_rewrite question

2008-08-29 Thread Krist van Besien
On Thu, Aug 28, 2008 at 17:21, Jason Pruim [EMAIL PROTECTED] wrote: It is case 1 that I want. I want people to be able to type in: HTTP://www.raoset.com/jasonpruim112 and have my script at: HTTP://www.raoset.com/purl/purl.php?purl=jasonpruim112 take over control. OK, than this rule: RewriteRule

Re: [EMAIL PROTECTED] mod_rewrite question

2008-08-29 Thread Krist van Besien
On Fri, Aug 29, 2008 at 15:21, Jason Pruim [EMAIL PROTECTED] wrote: Look in to your log: It says: [127.0.0.1/sid#1802648][rid#1836238/initial] (4) RewriteCond: input='GET' pattern='^TRACE' = not-matched What exactly do you have in your config? Looks like you have a RewriteCond somewhere, that

[EMAIL PROTECTED] mod_rewrite question

2008-08-28 Thread Jason Pruim
Hi Everyone, Just recently joined this list so I apologize upfront for the toes that I'm about to stomp on! I am trying to understand mod rewrite, and not having much luck... I am looking to do what I feel would be a simple rewrite but have not found the answer or could not understand

Re: [EMAIL PROTECTED] mod_rewrite question

2008-08-28 Thread Krist van Besien
On Thu, Aug 28, 2008 at 14:41, Jason Pruim [EMAIL PROTECTED] wrote: What I want to do is to rewrite this url: HTTP://www.raoset.com/purl/customer/index.php?purl=jasonpruim112 To something more like: HTTP://www.raoset.com/jasonpruim112 In what direction do you want the rewrite? Do you want:

Re: [EMAIL PROTECTED] mod_rewrite question

2008-08-28 Thread Jason Pruim
On Aug 28, 2008, at 9:21 AM, Krist van Besien wrote: On Thu, Aug 28, 2008 at 14:41, Jason Pruim [EMAIL PROTECTED] wrote: What I want to do is to rewrite this url: HTTP://www.raoset.com/purl/customer/index.php?purl=jasonpruim112 To something more like: HTTP://www.raoset.com/jasonpruim112

[EMAIL PROTECTED] mod_rewrite match POST data

2008-07-22 Thread mdn teo
Hi, I have a question about mod_rewrite. I want to deny access if the variables included in the GET or the POST are matching a defined string this is what I use: RewriteCond %{REQUEST_METHOD} ^(GET|POST)$ [NC] RewriteCond %{QUERY_STRING} (myvariable=xxx123) [NC] RewriteRule .*? - [F]

Re: [EMAIL PROTECTED] mod_rewrite match POST data

2008-07-22 Thread Eric Covener
On Tue, Jul 22, 2008 at 6:04 AM, mdn teo [EMAIL PROTECTED] wrote: Is there a way with mod_rewrite to verify and match the content of the POST? No, but maybe something like mod_security can. -- Eric Covener [EMAIL PROTECTED]

Re: [EMAIL PROTECTED] mod_rewrite match POST data

2008-07-22 Thread André Warnier
mdn teo wrote: Hi, I have a question about mod_rewrite. I want to deny access if the variables included in the GET or the POST are matching a defined string this is what I use: RewriteCond %{REQUEST_METHOD} ^(GET|POST)$ [NC] RewriteCond %{QUERY_STRING} (myvariable=xxx123) [NC]

[EMAIL PROTECTED] mod_rewrite - query string appended to URL?

2008-07-18 Thread Philip Pemberton
Hi, I'm trying to track down an issue with a set of rewrite rules that I'm using to convert links from www.mysite.com/dir/page (and /dir/page/) format into a query-string for a script. To give a better example: www.example.com/projects/foo= /index.php?projects/foo

Re: Re: [EMAIL PROTECTED] mod_rewrite difference Apache 2.0 and 2.2 ?

2008-06-16 Thread Jan
- Original Message - From: [EMAIL PROTECTED] To: users@httpd.apache.org Date: 15.06.2008 18:59:13 Subject: Re: [EMAIL PROTECTED] mod_rewrite difference Apache 2.0 and 2.2 ? Do you have MultiViews enabled under 2.2 but not under 2.0? Hi, just another wild speculation

Re: [EMAIL PROTECTED] mod_rewrite difference Apache 2.0 and 2.2 ?

2008-06-15 Thread Krist van Besien
On Sat, Jun 14, 2008 at 13:41, Jan [EMAIL PROTECTED] wrote: Hi! I have just noticed yesterday that one of my mod_rewrite rules which works fine in Apache 2.0 doesn't seem to work in Apache 2.2. Here is the rule: RewriteRule ^portfolio/([0-9]+)(/)?$ portfolio.php?serie=$1 So a request to

Re: [EMAIL PROTECTED] mod_rewrite difference Apache 2.0 and 2.2 ?

2008-06-15 Thread Sascha Kersken
Krist van Besien schrieb: On Sat, Jun 14, 2008 at 13:41, Jan [EMAIL PROTECTED] wrote: Hi! I have just noticed yesterday that one of my mod_rewrite rules which works fine in Apache 2.0 doesn't seem to work in Apache 2.2. Here is the rule: RewriteRule ^portfolio/([0-9]+)(/)?$

Re: [EMAIL PROTECTED] mod_rewrite difference Apache 2.0 and 2.2 ?

2008-06-15 Thread Eric
Do you have MultiViews enabled under 2.2 but not under 2.0? On Sun, Jun 15, 2008 at 9:09 AM, Sascha Kersken [EMAIL PROTECTED] wrote: Krist van Besien schrieb: On Sat, Jun 14, 2008 at 13:41, Jan [EMAIL PROTECTED] wrote: Hi! I have just noticed yesterday that one of my mod_rewrite rules

[EMAIL PROTECTED] mod_rewrite to fix trailing slash problem

2008-05-15 Thread Tim Gustafson
Hi, I have a web page that works when you include the trailing slash: http://www.foo.com/blah/ But, if you leave the trailing slash off, it does not work and you get a 403 error: http://www.foo/com/blah So, I tried to fix this using some mod_rewrite rules, as follows: RewriteEngine On

Re: [EMAIL PROTECTED] mod_rewrite to fix trailing slash problem

2008-05-15 Thread Eric Bowman
Tim Gustafson wrote: Hi, I have a web page that works when you include the trailing slash: http://www.foo.com/blah/ But, if you leave the trailing slash off, it does not work and you get a 403 error: http://www.foo/com/blah So, I tried to fix this using some mod_rewrite rules, as follows:

RE: [EMAIL PROTECTED] mod_rewrite to fix trailing slash problem

2008-05-15 Thread Tim Gustafson
Message- From: Eric Bowman [mailto:[EMAIL PROTECTED] Sent: Thursday, May 15, 2008 9:30 AM To: users@httpd.apache.org Subject: Re: [EMAIL PROTECTED] mod_rewrite to fix trailing slash problem Tim Gustafson wrote: Hi, I have a web page that works when you include the trailing slash: http

Re: [EMAIL PROTECTED] mod_rewrite to fix trailing slash problem

2008-05-15 Thread Frank Huddleston
You've probably already seen this, but just in case: I see in the config file in the Alias section, this: # Alias: Maps web paths into filesystem paths and is used to # access content that does not live under the DocumentRoot. # Example: # Alias /webpath /full/filesystem/path # #

Re: [EMAIL PROTECTED] mod_rewrite infinite loop problem

2008-05-15 Thread David Bylsma
David Bylsma wrote: On Sat, Apr 26 at 11:49 AM, Josua Silve [EMAIL PROTECTED] wrote: I would probably avoid the program rewrite map (which is a potential bottleneck). In the end, we have opted for use of the rewrite program, rewritten in c for speed. So far it appears to

[EMAIL PROTECTED] mod_rewrite, mod_proxy and http status codes

2008-05-05 Thread wi
Hi all I have a 2.2.8 server directing traffic (mod_rewrite) to a bunch of back-end servers. We use a 499 status code from the back end to indicate some sort of error condition to clients. When the clients access the back-end directly, there is no problem. When an error ocurrs, they get the 499.

[EMAIL PROTECTED] mod_rewrite infinite loop problem

2008-04-25 Thread David Bylsma
URL for product pages used to look like this: /product?sku=SKU In our new version, each product is getting a nice looking path assigned. New URLs are of the form /product/PRODUCT_PATH?sku=SKU I create a txt rewrite map file. Here is an example /etc/httpd/conf/sku_to_path.txt: 01

Re: [EMAIL PROTECTED] mod_rewrite: PATH_INFO gets injected with each Rule

2008-04-23 Thread Aleksander Budzynowski
-- Forwarded message -- From: Rich Bowen [EMAIL PROTECTED] To: users@httpd.apache.org Date: Tue, 22 Apr 2008 10:02:04 -0400 Subject: Re: [EMAIL PROTECTED] mod_rewrite: PATH_INFO gets injected with each Rule On Apr 21, 2008, at 08:54, Aleksander Budzynowski wrote: Hi

Re: [EMAIL PROTECTED] mod_rewrite: PATH_INFO gets injected with each Rule

2008-04-22 Thread Rich Bowen
On Apr 21, 2008, at 08:54, Aleksander Budzynowski wrote: Hi, The behaviour I'm seeing resemebles the bug described here: http:// archive.apache.org/gnats/7879 Reportedly it was fixed in 2.0.30. However, testing under both 2.2.3 and 2.0.61 I get the same sort of problem. Essentially,

[EMAIL PROTECTED] mod_rewrite: PATH_INFO gets injected with each Rule

2008-04-21 Thread Aleksander Budzynowski
Hi, The behaviour I'm seeing resemebles the bug described here: http://archive.apache.org/gnats/7879 Reportedly it was fixed in 2.0.30.However, testing under both 2.2.3 and 2.0.61 I get the same sort of problem. Essentially, PATH_INFO is appended to the end of the URI before each RewriteRule is

[EMAIL PROTECTED] mod_rewrite no substituion

2008-03-20 Thread mki2008
I am having trouble telling mod_rewrite to leave an incoming url as is. There are other rules that take every incoming url and rewrite it based on some parameters. In other words i am trying to say this url is an exception and there no matter what, leave it alone and let it go as is to

Re: [EMAIL PROTECTED] How to set environment variable from RewriteMap? (was Re: [EMAIL PROTECTED] mod_rewrite E flag does not set env. variable)

2008-03-12 Thread Thorsten Scherler
On Tue, 2008-03-11 at 14:22 +0100, Thorsten Scherler wrote: On Tue, 2008-03-11 at 13:20 +0100, Krist van Besien wrote: On Tue, Mar 11, 2008 at 12:29 PM, Thorsten Scherler [EMAIL PROTECTED] wrote: ... Now, what is not entirely clear is what you are trying to do. You want to look something

Re: [EMAIL PROTECTED] How to set environment variable from RewriteMap? (was Re: [EMAIL PROTECTED] mod_rewrite E flag does not set env. variable)

2008-03-11 Thread Krist van Besien
On Tue, Mar 11, 2008 at 8:37 AM, Thorsten Scherler [EMAIL PROTECTED] wrote: On Mon, 2008-03-10 at 14:01 +0100, Krist van Besien wrote: If you want to save that information during request processing you can use an environment variable, just like you did. If you want to save information

Re: [EMAIL PROTECTED] How to set environment variable from RewriteMap? (was Re: [EMAIL PROTECTED] mod_rewrite E flag does not set env. variable)

2008-03-11 Thread Thorsten Scherler
On Mon, 2008-03-10 at 14:10 +0100, Krist van Besien wrote: On Mon, Mar 10, 2008 at 1:44 PM, Thorsten Scherler [EMAIL PROTECTED] wrote: Does somebody has an idea how I can save either whether a rewrite had happened or the result of the rewriteMap expression. Maybe you could try this:

Re: [EMAIL PROTECTED] How to set environment variable from RewriteMap? (was Re: [EMAIL PROTECTED] mod_rewrite E flag does not set env. variable)

2008-03-11 Thread Thorsten Scherler
On Tue, 2008-03-11 at 09:04 +0100, Krist van Besien wrote: On Tue, Mar 11, 2008 at 8:37 AM, Thorsten Scherler [EMAIL PROTECTED] wrote: On Mon, 2008-03-10 at 14:01 +0100, Krist van Besien wrote: If you want to save that information during request processing you can use an environment

Re: [EMAIL PROTECTED] How to set environment variable from RewriteMap? (was Re: [EMAIL PROTECTED] mod_rewrite E flag does not set env. variable)

2008-03-11 Thread Krist van Besien
On Tue, Mar 11, 2008 at 12:29 PM, Thorsten Scherler [EMAIL PROTECTED] wrote: To overcome that problem I took your suggestion and combined it like: RewriteCond ${portadaboja:boletin} ^(.+)$ RewriteCond %{REQUEST_URI} /%1 but that is never got hit. What I actually trying is to

Re: [EMAIL PROTECTED] How to set environment variable from RewriteMap? (was Re: [EMAIL PROTECTED] mod_rewrite E flag does not set env. variable)

2008-03-11 Thread Thorsten Scherler
On Tue, 2008-03-11 at 13:20 +0100, Krist van Besien wrote: On Tue, Mar 11, 2008 at 12:29 PM, Thorsten Scherler [EMAIL PROTECTED] wrote: To overcome that problem I took your suggestion and combined it like: RewriteCond ${portadaboja:boletin} ^(.+)$ RewriteCond %{REQUEST_URI} /%1

Re: [EMAIL PROTECTED] mod_rewrite E flag does not set env. variable

2008-03-10 Thread Krist van Besien
On Mon, Mar 10, 2008 at 9:58 AM, Thorsten Scherler [EMAIL PROTECTED] wrote: Hi all, I am trying to use the E flag in some of my rewrite rules but without suggest. I have following configuration: RewriteMap portadaboja txt:/opt/datos/httpd/redirect.txt RewriteRule ^/BOJA$

[EMAIL PROTECTED] mod_rewrite/mod_negotiation/mod_dir interaction and SSI

2008-03-10 Thread Michael J Gruber
Hi there, this is a question about Apache/2.0.52. I have content negotiation and mod_dir working, serving stuff like dir/index.html.en or dir/index.html.de on requests for: dir/index.html dir/index dir/ dir But I'm confused about the order in which rewrite, negotiation and dir modules are

Re: [EMAIL PROTECTED] mod_rewrite E flag does not set env. variable

2008-03-10 Thread Thorsten Scherler
On Mon, 2008-03-10 at 11:20 +0100, Krist van Besien wrote: On Mon, Mar 10, 2008 at 9:58 AM, Thorsten Scherler [EMAIL PROTECTED] wrote: Hi all, I am trying to use the E flag in some of my rewrite rules but without suggest. I have following configuration: RewriteMap portadaboja

Re: [EMAIL PROTECTED] mod_rewrite/mod_negotiation/mod_dir interaction and SSI

2008-03-10 Thread Thorsten Scherler
On Mon, 2008-03-10 at 13:03 +0100, Thorsten Scherler wrote: On Mon, 2008-03-10 at 12:35 +0100, Michael J Gruber wrote: Hi there, ... Background: I'm experimenting with per dir mod_rewrite although this stuff will end up in server config finally, this may make a difference. I'm using

Re: [EMAIL PROTECTED] mod_rewrite/mod_negotiation/mod_dir interaction and SSI

2008-03-10 Thread Thorsten Scherler
On Mon, 2008-03-10 at 12:35 +0100, Michael J Gruber wrote: Hi there, ... Background: I'm experimenting with per dir mod_rewrite although this stuff will end up in server config finally, this may make a difference. I'm using rules like RewriteEngine on RewriteRule ^t(.*)/([^/]*)\.en$

[EMAIL PROTECTED] How to set environment variable from RewriteMap? (was Re: [EMAIL PROTECTED] mod_rewrite E flag does not set env. variable)

2008-03-10 Thread Thorsten Scherler
On Mon, 2008-03-10 at 13:12 +0100, Thorsten Scherler wrote: On Mon, 2008-03-10 at 11:20 +0100, Krist van Besien wrote: On Mon, Mar 10, 2008 at 9:58 AM, Thorsten Scherler [EMAIL PROTECTED] wrote: Hi all, I am trying to use the E flag in some of my rewrite rules but without

Re: [EMAIL PROTECTED] mod_rewrite E flag does not set env. variable

2008-03-10 Thread Krist van Besien
On Mon, Mar 10, 2008 at 1:12 PM, Thorsten Scherler [EMAIL PROTECTED] wrote: On Mon, 2008-03-10 at 11:20 +0100, Krist van Besien wrote: On Mon, Mar 10, 2008 at 9:58 AM, Thorsten Scherler [EMAIL PROTECTED] wrote: Hi all, I am trying to use the E flag in some of my rewrite rules

Re: [EMAIL PROTECTED] How to set environment variable from RewriteMap? (was Re: [EMAIL PROTECTED] mod_rewrite E flag does not set env. variable)

2008-03-10 Thread Krist van Besien
On Mon, Mar 10, 2008 at 1:44 PM, Thorsten Scherler [EMAIL PROTECTED] wrote: RewriteMap portadaboja txt:/opt/datos/httpd/redirect.txt SetEnv FOCUS ${portadaboja:boletin} but the variable will the return the literal context. Meaning ${portadaboja:boletin} and not the result of this

Re: [EMAIL PROTECTED] mod_rewrite/mod_negotiation/mod_dir interaction and SSI

2008-03-10 Thread Joshua Slive
On Mon, Mar 10, 2008 at 7:35 AM, Michael J Gruber [EMAIL PROTECTED] wrote: Background: I'm experimenting with per dir mod_rewrite although this stuff will end up in server config finally, this may make a difference. I'm using rules like I'm not even going to read the rest of the question

Re: [EMAIL PROTECTED] mod_rewrite/mod_negotiation/mod_dir interaction and SSI

2008-03-10 Thread Michael J Gruber
Joshua Slive venit, vidit, dixit 10.03.2008 14:57: On Mon, Mar 10, 2008 at 7:35 AM, Michael J Gruber [EMAIL PROTECTED] wrote: Background: I'm experimenting with per dir mod_rewrite although this stuff will end up in server config finally, this may make a difference. I'm using rules like

[EMAIL PROTECTED] mod_rewrite to point to subdomain

2008-03-06 Thread John Donaldson
I have several sites with URLs like main.server.com/mydir1/page1 and would like to use subdomains so people could have their own personal domain that maps to their directory. For the above example, I'd like to use subdomain.server.com/page1, but it actually pulls the content from

[EMAIL PROTECTED] mod_rewrite, cookies and : in the value

2008-03-04 Thread Ben Spencer
Configuration: 2 servers which use two different cookies to help maintain sessions. The cookies are set domain wide so each server can actually update the others cookies. When a request is sent to either server, I want to be able to update the others cookies (session timeout time) with

Re: [EMAIL PROTECTED] mod_rewrite, cookies and : in the value

2008-03-04 Thread Daniel Aleksandersen
On 2008-03-04, Ben Spencer wrote: This is a simple task, except that the value of the cookie actually has a : in it which confuses mod_rewrite and the parameters since the parameter separator is a :. You just need to escape the colon as “%3A” (percentage-three-uppercase A). -- Daniel’s linux

RE: [EMAIL PROTECTED] mod_rewrite, cookies and : in the value

2008-03-04 Thread Ben Spencer
This is a simple task, except that the value of the cookie actually has a : in it which confuses mod_rewrite and the parameters since the parameter separator is a :. You just need to escape the colon as %3A (percentage-three-uppercase A). HmmmThanks. How to do that in the apache

Re: [EMAIL PROTECTED] mod_rewrite redirecting multiple domain names to the one name

2008-02-29 Thread Joshua Slive
On Fri, Feb 29, 2008 at 2:28 AM, Nils Jeppe [EMAIL PROTECTED] wrote: On Fri, 29 Feb 2008, Viv D-F wrote: I figure this is a fairly common problem, but I haven't been able to find any examples of how this is usually done. I'm not convinced that this is best done in the Apache config.

[EMAIL PROTECTED] mod_rewrite redirecting multiple domain names to the one name

2008-02-28 Thread Viv D-F
I have a web server set up with 3 different domain names registered. For simplicity, I'll call them... http://site1.com http://site2.com http://site3.com I want http://site1.com to be the name people remember, so no matter which URL they use to get to the site, they are redirected to

Re: [EMAIL PROTECTED] mod_rewrite redirecting multiple domain names to the one name

2008-02-28 Thread Nils Jeppe
On Fri, 29 Feb 2008, Viv D-F wrote: I figure this is a fairly common problem, but I haven't been able to find any examples of how this is usually done. I'm not convinced that this is best done in the Apache config. Is this done at the DNS instead? There are, I think, three ways to do

Re: [EMAIL PROTECTED] mod_rewrite question - How to avoid Apache's 301 redirect to add trailing slash?

2008-02-27 Thread Eric Covener
On Wed, Feb 27, 2008 at 2:40 AM, chengas123 [EMAIL PROTECTED] wrote: However, I still have one bug left in this implementation, which shows up when I request a directory without a trailing slash. For example, lumidant.com/contact becomes lumidant.com/lumidant/contact/ because Apache does

Re: [EMAIL PROTECTED] mod_rewrite question - How to avoid Apache's 301 redirect to add trailing slash?

2008-02-27 Thread chengas123
Yes, that essentially is exactly what I'd like to do. However, I'm not sure how to. I know how to test if the requested resource is a directory, but does anyone have any ideas on how I would test if the rewritten URL is an existing directory? Also, thanks for the tip on disabling directory

Re: [EMAIL PROTECTED] mod_rewrite question - How to avoid Apache's 301 redirect to add trailing slash?

2008-02-27 Thread Vincent Bray
On 27/02/2008, chengas123 [EMAIL PROTECTED] wrote: Yes, that essentially is exactly what I'd like to do. However, I'm not sure how to. I know how to test if the requested resource is a directory, but does anyone have any ideas on how I would test if the rewritten URL is an existing

Re: [EMAIL PROTECTED] mod_rewrite question - How to avoid Apache's 301 redirect to add trailing slash?

2008-02-27 Thread chengas123
Thanks noodl. This is a good idea, which I would like to use. I can't figure out how %{REQUEST_FILENAME} works though! If I use RewriteCond %{REQUEST_FILENAME} -d it only ever returns when I visit my homepage at lumidant.com. I used only this rule in my .htaccess and had it redirect to

Re: [EMAIL PROTECTED] mod_rewrite question - How to avoid Apache's 301 redirect to add trailing slash?

2008-02-27 Thread chengas123
Thank you all for your help. There were a couple problems I was having. The biggest turned out to be an .htaccess file in another directory interfering with this one, which made it very hard to figure out what was going on. Thanks again, Ben chengas123 wrote: Thanks noodl. This is a

[EMAIL PROTECTED] mod_rewrite question - How to avoid Apache's 301 redirect to add trailing slash?

2008-02-26 Thread chengas123
Hi, I signed up for a hosting account that can support many domains. One domain is the root web folder and all the others are subdirectories in that folder. This gets confusing to maintain, so I’d like to move the main domain into a sub directory too. I’ve gotten pretty far using mod_rewrite:

[EMAIL PROTECTED] mod_rewrite

2008-02-13 Thread elderjmp
Hi there folks,,, everybody cool!? I am working on a redirection in my apache server for everything that came from port 80 (http://www.elderjmp.com.br) goes to port 443 ( https://www.elderjmp.com.br). That's the rule that I am working on: RewriteEngine On RewriteCond %{SERVER_PORT} ^80$

Re: [EMAIL PROTECTED] mod_rewrite

2008-02-13 Thread Michael McGlothlin
Create an exception rule before your other rules that will match only what you want to ignore. Have it sub to - and make it a [L] rule. I think that'll take care of you. Hi there folks,,, everybody cool!? I am working on a redirection in my apache server for everything that came from port 80

Re: [EMAIL PROTECTED] mod_rewrite

2008-02-13 Thread Christian Folini
On Wed, Feb 13, 2008 at 06:32:21PM -0700, Michael McGlothlin wrote: Create an exception rule before your other rules that will match only what you want to ignore. Have it sub to - and make it a [L] rule. I think that'll take care of you. i.e. RewriteEngine On RewriteLogLevel 2 RewriteLog

Re: [EMAIL PROTECTED] mod_rewrite + mod_proxy trouble

2008-02-11 Thread Travis Sidelinger
Krist, Ignore my last question, I was missing a quote. Thanks a bunch, that did it. My final rule looks like: RewriteCond %{REMOTE_HOST} ^192\.168\.220\. RewriteRule ^(/.*)$ proxy:balancer://aquabrowser$1?c_loc=220 [QSA,L] Krist van Besien wrote: On Feb 11, 2008 3:25 PM, Travis

Re: [EMAIL PROTECTED] mod_rewrite + mod_proxy trouble

2008-02-11 Thread Travis Sidelinger
Thanks, I see what's going on now. Here is what I've tried followed by the response on the backend server: Case 1: RewriteRule ^/(.*)$ proxy:balancer://aquabrowser$1?c_loc=220 [QSA,L] GET /?c_loc=220\ HTTP/1.1 - Note I get a 500 error when trying to access anything other then /. Case2:

  1   2   3   4   5   6   >