httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: [users@httpd] mod_rewrite simple questions
Date Mon, 19 Jan 2004 11:42:37 GMT
Scott Taylor wrote:
> 1.  I would like to refer to all of my pages without the ending and with
> a trailing slash.  for instance, instead of domain.com/somepage.html it
> should be domain.com/somepage/
>
> There may be a variety of different file types in a directory, so it
> would need a RewriteCond statement to find if there was a coresponding
> file type...

Why don't you just create those directories and drop an "index.html" or
"index.php" in them? That will save you a lot of headaches. It would make
your setup less obscure.

> 2.  I would also like to
>
> rewrite:
>     http://username:password@domain.com/protected/archive/(.*)
>
> to:
>     http://domain.com/protected/archive/$1

Not possible. Apache will never get a request like that. The
username:password part will be stripped by the client and in some cases be
inserted in an Authentication header.

If the user types "http://foo:bar@domain.com/protected/archive/xyz" in his
address bar, the client will send a request for "/protected/archive/xyz" to
domain.com. If all you want is redirect or rewrite that to "/archive/xyz",
it is trivial, and is left as an excersice for you :)

Regards,
Robert Andersson


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


Mime
View raw message