RE: [EMAIL PROTECTED] File permissions in an Apache enviroment

2008-01-06 Thread Tomas Larsson
Well, the problem is I cant put the username and the password in the url,
http://user:[EMAIL PROTECTED]/scriptdir/script is not allowed, thats the reason
why I cant use .htpasswd to protect the dir.
If it wasn't for this restriction I would be able to use .htpasswd w/o any
problem.
so-far Ive put 100 on the dir, and I have done some simple checks, like I
cant wget anything from the dir, if I wget an existing filename I get 0
bytes.

With best regards

Tomas Larsson
Sweden
http://www.tlec.se
http://www.ebaman.com

Verus Amicus Est Tamquam Alter Idem 

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
> Joshua Slive
> Sent: Sunday, January 06, 2008 5:08 AM
> To: users@httpd.apache.org; [EMAIL PROTECTED]
> Subject: Re: [EMAIL PROTECTED] File permissions in an Apache enviroment
> 
> On Jan 5, 2008 8:23 PM, Tomas Larsson <[EMAIL PROTECTED]> wrote:
> > Trying to lock down a special folder.
> > Now I cant use .htaccess + .htpasswd for some reason.
> >
> > The directory must be executable for the server (php-script).
> > I dont want anyone outside to be able get anything from the dir.
> > The script is run from a normal url, i.e 
> > http://mysite/scriptdir/script.php
> > The url is initiated from the server-bos itself throuh some sort of 
> > CRON-Mechanism (cant explain it better) I have no access to the 
> > server-config, only through .htaccess the only working way 
> I've found 
> > out, so far, is to set the permissions on the dir to 100.
> >
> > Anyone that has better solutions or ideas.
> 
> Is .htaccess enabled in that directory (with AllowOverride in 
> httpd.conf)? If not, you can't do anything. You can test this 
> by putting an obvious syntax error in .htaccess and 
> requesting the page.
> If you don't get a 500 error, you don't have the rights to 
> use .htaccess.
> 
> Joshua.
> 
> -
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>"   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] Keeping denial statements from interfering with each other?

2008-01-06 Thread Hadmut Danisch

Hi,

just a problem occuring with an apache server:


The config contains common rules to deny access to particular files,
e.g.

 
   Order allow,deny
   Deny from all
 


Works as expected.


But now the site was under attack from particular IP addresses. A section


 deny from a.b.c.d/20
The strange side effect was that now the .htaccess files became readible 
from

ip addresses other than a.b.c.d, because the Location directive is evaluated
after the Files directive and overrides it in the sense that everything 
from

IP addresses other than a.b.c.d is allowed.

What is the best way to keep such deny clauses from interferring with 
each other?



regards
Hadmut




-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] File permissions in an Apache enviroment

2008-01-06 Thread Joshua Slive
On Jan 6, 2008 3:04 AM, Tomas Larsson <[EMAIL PROTECTED]> wrote:
> Well, the problem is I cant put the username and the password in the url,
> http://user:[EMAIL PROTECTED]/scriptdir/script is not allowed, thats the 
> reason
> why I cant use .htpasswd to protect the dir.

That's a client restriction and has nothing to do with apache.

> If it wasn't for this restriction I would be able to use .htpasswd w/o any
> problem.
> so-far Ive put 100 on the dir, and I have done some simple checks, like I
> cant wget anything from the dir, if I wget an existing filename I get 0
> bytes.

You can use Order/Allow/Deny to restrict by IP address. Other than
that, you need to specify how you expect to differentiate between you
authorized and unauthorized users.

Joshua.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] mod_rewrite base url

2008-01-06 Thread Todd Nine
That fixed it, thanks Joshua!  Here is my final config.

RewriteEngine On

#Match all request URIs that are empty
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) http://%{HTTP_HOST}/insight/


On Jan 5, 2008 11:04 PM, Joshua Slive <[EMAIL PROTECTED]> wrote:

> On Jan 5, 2008 9:13 PM, Todd Nine <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >   I'm running Apache with mod_jk, and several tomcat back end servers.
>  I
> > have a default application I would like to use, but I'm not sure how to
> get
> > mod_rewrite to work to redirect the client to the default server.  What
> I
> > would like is something like the following
> >
> > user enters --> http://www.myserver.com/
> > mod_rewrite redirects to --> http://www.myserver.com/insight
> >
> > I have the following, but its not working.  I'm basically trying to find
> an
> > empty URI then redirect, but it doesn't seem to work.  I just get the
> empty
> > directory indexing.  Could anyone give me a hand?
> >
> > RewriteEngine On
> >
> > #Match all request URIs that are empty
> > RewriteCond %{REQUEST_URI} ^$
> > RewriteRule (.*) http://%{HTTP_HOST}/insight/
>
> REQUEST_URI is never empty. It always contains at least "/". What you
> want is perhaps
> RewriteRule ^/$ /insight/ [R]
> (assuming you are doing this in the main server config in httpd.conf)
>
> Joshua.
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>   "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


[EMAIL PROTECTED] Question Using mod_auth

2008-01-06 Thread Bryan Richardson
Hello all,

I currently have Apache 2.2 sitting in front of my Ruby on Rails
application, proxying non-static requests to the Rails server running on a
different port.  I have an admin portion of my Rails application that is
accessed by going to www.mysite.com/admin/.  I want to protect the admin
portion using mod_auth in Apache, and I was wondering if that would be
possible since I'm proxying that type of stuff to my Rails server.  Can I
implement a Rewrite rule to look for attempts to access the admin/ portion
of the application and force authorization?  If so, can someone provide me
with an example?  If not, is it possible to do this another way?  Below is
the relevant portion of my config file that I use to proxy the requests.

  
Allow from All
  

  RewriteEngine On
  RewriteRule ^/$ /index.html [QSA]
  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
  RewriteRule .* http://127.0.0.1:3001%{REQUEST_URI} [L,P,QSA]

Thanks in advance!!! -- BTR


[EMAIL PROTECTED] Configuring ssl on apache 2 and Leopard 10.5.1

2008-01-06 Thread Ben assis
Hi all,
On an imac intel dual core, I recently migrated to Leopard from
Tiger 10.4.10. On my Tiger client, I had installed my own web server
using openssl and mod_ssl with Apache 1.3 server; https was working
fine.
On Leopard with apache 2.2.6 and OpenSSL 0.9.7,  I cannot set my own web
server
to work with openssl under https protocol.
Here are relevant informations about my settings :

As my ISP is blocking ports 80 and 443, I was using ports 8080 and 8083
under Tiger.
Under Leopard, as I could not set my server to work with ssl, I discovered,
using nmap, that only port 8080 is working for http and port 88 for
kerberos.


I tested my ports with http://www.canyouseeme.org/, I got the same result :
only two ports are opened.

So I phoned my ISP where techs told me that only a few ports were blocked
(22, 25, 80, 443,...) and port 8083 was still working on their side !
As my ISP doesn't block port 8083, I must understand that the problem is in
my machine... but where ? I do not have any firewall or router. Is it
possible that the Apache 2 server could be responsible ?


Other relevant information :

- I must point out that ssl module is loaded in my httpd.conf.
- In httpd-vhosts.conf I have declared 2 virtual hosts which work
 fine without httpd-ssl.conf and actually port 8080 is working fine for
http.
- Phpinfo() tells me that openssl 0.97l is enabled.


Any idea ?
Thanks


RE: [EMAIL PROTECTED] File permissions in an Apache enviroment

2008-01-06 Thread Tomas Larsson
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
> Joshua Slive
> Sent: Sunday, January 06, 2008 4:13 PM
> To: users@httpd.apache.org; [EMAIL PROTECTED]
> Subject: Re: [EMAIL PROTECTED] File permissions in an Apache enviroment
> 
> On Jan 6, 2008 3:04 AM, Tomas Larsson <[EMAIL PROTECTED]> wrote:
> > Well, the problem is I cant put the username and the 
> password in the 
> > url, http://user:[EMAIL PROTECTED]/scriptdir/script is not 
> allowed, thats 
> > the reason why I cant use .htpasswd to protect the dir.
> 
> That's a client restriction and has nothing to do with apache.

Yes I know, it's the way may hosts "CRON-job" implementation works.


> 
> > If it wasn't for this restriction I would be able to use 
> .htpasswd w/o 
> > any problem.
> > so-far Ive put 100 on the dir, and I have done some simple checks, 
> > like I cant wget anything from the dir, if I wget an 
> existing filename 
> > I get 0 bytes.
> 
> You can use Order/Allow/Deny to restrict by IP address. Other 
> than that, you need to specify how you expect to 
> differentiate between you authorized and unauthorized users.
> 
> Joshua.
Basically it is a MySQL backup-script written in PHP.
It is called by the "CRON-implementation" my host has.
It works by calling my virtual server with the url to the directory with the
script and the script itself, ie http://mydomain/scriptlocation/script.php
Obviously, doing it this way it is sort of open for the "general public"
provided that they know what to look for.
So obviously I don't want anyone else to go into it.
It should only be accessible for the Cron-command.
I guess that I need to implement some sort of password-control in the script
itself, but I want the directory totaly safe from anybody else.

With best regards

Tomas Larsson
Sweden
http://www.tlec.se
http://www.ebaman.com

Verus Amicus Est Tamquam Alter Idem


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Configuring ssl on apache 2 and Leopard 10.5.1

2008-01-06 Thread William A. Rowe, Jr.

Ben assis wrote:


As my ISP is blocking ports 80 and 443, I was using ports 8080 and 8083 
under Tiger.
Under Leopard, as I could not set my server to work with ssl, 


When you upgraded, you probably also introduced Leopard's own firewall.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] DBDmysql connecting but not authenticating

2008-01-06 Thread Tom Donovan

paredes wrote:

Greetings!
I've been running OS-X 10.3.9, with apache2.2.3 [ldap w/failover to
mod_authn_dbd], mysql5.0.3x & php5.1 all built from source. I've just
upgraded our test server to OSX 10.5, apache2.2.6 & mysql5.0.51. The
problem is that while the DBDDriver connects it refuses to authenticate
valid users. The apache logs which are set to debug return:
"user jones: authentication failure for "/ProtectedArea": Password Mismatch"
When I deliberately provide an unknown user the logs return: "user mary
not found: /ProtectedArea"

It sounds like you are getting *something* returned by your authentication query, just not the exact 
password hash.


Possibly the problem is trailing spaces.  The behavior of MySQL CHAR and VARCHAR fields for trailing 
spaces has changed over time per http://dev.mysql.com/doc/refman/5.0/en/char.html


Try a SQL statement like:  "SELECT TRIM(password_field) FROM user_table WHERE 
user_field = %s"
instead of:  "SELECT password_field FROM user_table WHERE user_field = %s"

Additional clues might be found by enabling MySQL logging per:
  http://dev.mysql.com/doc/refman/5.0/en/query-log.html
and checking what your SQL statement actually looks like to MySQL.

-tom-

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Configuring ssl on apache 2 and Leopard 10.5.1

2008-01-06 Thread Ben assis
Hi William,
You could explain how I would introduced Leopard's own firewall ? Would you
tell me how and wherer I could do that: in which system preferences ?
Regards

2008/1/6, William A. Rowe, Jr. <[EMAIL PROTECTED]>:
>
> Ben assis wrote:
> >
> > As my ISP is blocking ports 80 and 443, I was using ports 8080 and 8083
> > under Tiger.
> > Under Leopard, as I could not set my server to work with ssl,
>
> When you upgraded, you probably also introduced Leopard's own firewall.
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>"   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


[EMAIL PROTECTED] Would like to understand this weird url request

2008-01-06 Thread Robinson Craig
Hi Folks,

When I request the following URL from our webserver (via a browser):

http://www.nrw.qld.gov.au/vegetation/index.html/templates/headline_temp.
php

I get the weirdest thingI actually get a response as if what I was
really requesting was:

http://www.nrw.qld.gov.au/vegetation/index.html

In the htdocs directory structure, /vegetation/index.html is a file not
a dir, and there definitely isn't a
/vegetation/index.html/templates/headline_temp.php file.

If anyone can help me understand this phenomena, I would be greatly
appreciated.

 
Cheers, Dazed and confused (aka Craig)

Environment: Apache 1.3.36 on Sun Solaris 8


The information in this email together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this email message is prohibited, unless
as a necessary part of Departmental business.
If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.



-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Would like to understand this weird url request

2008-01-06 Thread Sander Temme


On Jan 6, 2008, at 9:07 PM, Robinson Craig wrote:

http://www.nrw.qld.gov.au/vegetation/index.html/templates/headline_temp 
.

php

I get the weirdest thingI actually get a response as if what I was
really requesting was:

http://www.nrw.qld.gov.au/vegetation/index.html

In the htdocs directory structure, /vegetation/index.html is a file  
not

a dir, and there definitely isn't a
/vegetation/index.html/templates/headline_temp.php file.


What you'll find is that the remaining part of the URL ('/templates/ 
headline_temp.php') is passed to the request as pathinfo.  A static  
file (like index.html) can typically not do a whole lot with that  
information, but a program like a CGI or PHP script can... try making  
test-cgi in your cgi-bin directory executable and calling http://yourserver/cgi-bin/test-cgi/foo/bar 
.  You'll see the CGI get executed, and an environment variable  
PATH_INFO is passed in with the /foo/bar bit.


I guess the canonical question is: what is your intention when you  
request the original URL?


S.

--
Sander Temme
[EMAIL PROTECTED]
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF




-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] mod_disk_cache

2008-01-06 Thread Campbell, Lance
httpd-2.0.59

 

Does mod_disk_cache support a mechanism that one can request a
particular URL to have its content refreshed?

 

I know you can delete the entire disk cache root and it will then
refresh the content.  But is there a way to just request that a
particular URL be refreshed within the cached content?

 

I thought I would create multiple disk caches and then delete the cached
files in the disk cache I wanted to refresh.  But it looks like a
virtual host can only have one disk cache in it.  Is this true?

 

Thanks,

 

Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu

 



Re: [EMAIL PROTECTED] mode_rewrite hostnames and wikiwords

2008-01-06 Thread Phil Wild
Hi Mike,

This worked a treat

many thanks for your help and knowledge...

Phil

On 05/01/2008, Mike Cardwell <[EMAIL PROTECTED]> wrote:
> Phil Wild wrote:
>
> > Hello apache experts:-)
> >
> > I am trying to rewrite a url which conatins a hostname, converting the
> > hostname to a wikiword.
> >
> > What I have so far is:
> >
> > RewriteRule ^/doc/([a-z,A-Z]*.*)\.([a-z,A-Z]*.*)$ /doc/$1$2 [N]
> > RewriteRule ^/doc/([A-Z]*.*)$ /twiki/bin/view/Main/$1 [PT]
> >
> > which takes a URL that looks like
> >
> > http://www.example.com/doc/hostname.example.com
> >
> > and runs it as
> >
> > http://www.example.com/doc/hostnameexamplecom
> >
> > which is close but I would really like to run it as
> >
> > http://www.example.com/doc/HostnameExampleCom
> >
> > Is this possible and if so, how is it done?
>
> Something like this maybe?
>
> RewriteEngine On
> RewriteMapuppercase int:toupper
> RewriteRule   ^/doc/((.*)\.)?([a-z])(.*)$ /doc/$2${uppercase:$3}$4 [N]
> RewriteRule   ^/doc/(.*)  /twiki/bin/view/Main/$1 [PT]
>
> Mike
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>   "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Tel: 0400 466 952
Fax: 0433 123 226
email: [EMAIL PROTECTED]

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] Will Apache still work with Windows SP1?

2008-01-06 Thread Nir Ofek
Hi there,

Thanks for anyone who might be willing and able to help me (me = a total
Apache novice) with this question.

The Apache documentation
statesthat
for running Apache HTTP for windows XP, I should download SP2.
However,
I have SP1, and want to avoid the risk of installing SP2.

*Any idea if Apache will still run well with SP1, or if indeed downloading
SP2 is critical for Apache?*

Many thanks,

Nir


[EMAIL PROTECTED] Rewrite rule security question

2008-01-06 Thread Lars
Hello list!

I am working on a admin site and I'm using htaccess for access
restrictions. I have a script that generates the htaccess file and I
think it is pretty secure but I want to have yours opinions..

I use ip restrictions, and cookie restrictions. I use standard php
session for generating and setting session cookie. The .htaccess file
generated looks like this:

#--
RewriteEngine on

Order deny,allow
deny from all
allow from  80.80.80.80 90.90.90.90

RewriteRule .* - [E=REMOTE_USER:user1,E=PHP_AUTH_USER:user2,C]
RewriteCond %{HTTP_COOKIE} !^.*PHPSESSID=cccdddeeefff111222333.*$

RewriteRule .* - [E=REMOTE_USER:user2,E=PHP_AUTH_USER:user2,C]
RewriteCond %{HTTP_COOKIE} !^.*PHPSESSID=888777666555444332211aabb.*$

RewriteRule .*$ - [F]

ErrorDocument 403 /index.php?error403
ErrorDocument 404 /index.php?error404
#--

Is this a secure way of doing this? Is there anything I can do
different or more secure? The REMOTE_USER and PHP_AUTH_USER variables
needs to be set for making some admin tools inside the .htaccess admin
dir work. Like trac..


In front thanks,
  Lars

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] mode_rewrite hostnames and wikiwords

2008-01-06 Thread Phil Wild
Hmmm

hit a snag

how would I expand this rule to capture and convert the following?

your.host.name -> YourHostName (works with rule)
YOUR.HOST.NAME -> YourHostName (currently not handled)
Yo-ur.HOST.name -> YourHostName (currently not handled)

effectively the spec would be to take /doc/FQDN (regardless of case presented)
and capitaliseing every dot separated word returning
/doc/FullyQualifiedDomainName removing any characters other than [A-Z][a-z][0-9]

Many thanks

Phil

On 07/01/2008, Phil Wild <[EMAIL PROTECTED]> wrote:
> Hi Mike,
>
> This worked a treat
>
> many thanks for your help and knowledge...
>
> Phil
>
> On 05/01/2008, Mike Cardwell <[EMAIL PROTECTED]> wrote:
> > Phil Wild wrote:
> >
> > > Hello apache experts:-)
> > >
> > > I am trying to rewrite a url which conatins a hostname, converting the
> > > hostname to a wikiword.
> > >
> > > What I have so far is:
> > >
> > > RewriteRule ^/doc/([a-z,A-Z]*.*)\.([a-z,A-Z]*.*)$ /doc/$1$2 [N]
> > > RewriteRule ^/doc/([A-Z]*.*)$ /twiki/bin/view/Main/$1 [PT]
> > >
> > > which takes a URL that looks like
> > >
> > > http://www.example.com/doc/hostname.example.com
> > >
> > > and runs it as
> > >
> > > http://www.example.com/doc/hostnameexamplecom
> > >
> > > which is close but I would really like to run it as
> > >
> > > http://www.example.com/doc/HostnameExampleCom
> > >
> > > Is this possible and if so, how is it done?
> >
> > Something like this maybe?
> >
> > RewriteEngine On
> > RewriteMapuppercase int:toupper
> > RewriteRule   ^/doc/((.*)\.)?([a-z])(.*)$ /doc/$2${uppercase:$3}$4 [N]
> > RewriteRule   ^/doc/(.*)  /twiki/bin/view/Main/$1 [PT]
> >
> > Mike
> >
> > -
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >   "   from the digest: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Tel: 0400 466 952
> Fax: 0433 123 226
> email: [EMAIL PROTECTED]
>


-- 
Tel: 0400 466 952
Fax: 0433 123 226
email: [EMAIL PROTECTED]

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] mode_rewrite hostnames and wikiwords

2008-01-06 Thread Dragon

Phil Wild did speak thusly:

Hmmm

hit a snag

how would I expand this rule to capture and convert the following?

your.host.name -> YourHostName (works with rule)
YOUR.HOST.NAME -> YourHostName (currently not handled)
Yo-ur.HOST.name -> YourHostName (currently not handled)

effectively the spec would be to take /doc/FQDN (regardless of case presented)
and capitaliseing every dot separated word returning
/doc/FullyQualifiedDomainName removing any characters other than 
[A-Z][a-z][0-9]

 End original message. -

If I were to do something like this, I would most likely use the 
RewriteMap directive to pass the incoming URL to a short Perl script 
to do the transformation. The stdin file handle presents the program 
with the request URL and you pass the result back via the stdout file handle.


http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritemap

See the section on the page linked above entitled "External Rewriting 
Program" for details and a skeleton Perl script you can add your 
processing to.


Dragon

~~~
 Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
~~~


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]