You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Scott Taylor <sc...@bigfoot.com> on 2004/01/20 07:36:50 UTC
[users@httpd] mod_rewrite question
What is the easiest way to rewrite:
http://username:password@miningstocks.com/protected/archive/(.*)
to: http://miningstocks.com/protected/archive/$1
(i.e. http://username:password@domain.com/protected/archive/test.php
to http://miningstocks.com/protected/archive/test.php)
Best Regards,
Scott Taylor
---------------------------------------------------------------------
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
RE: [users@httpd] Another mod_rewrite question
Posted by Wil Hatfield <wi...@hvhm.net>.
Perhaps I wasn't clear enough. I want to do a substitution from & to &
so that the following occurs.
When someone accesses:
/Merchant2/merchant.mvc?Screen=CTGY&Category_Code=LFR
I want it to rewrite to:
/Merchant2/merchant.mvc?Screen=CTGY&Category_Code=LFR
Thanks in advance,
Wil
---------------------------------------------------------------------
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
RE: [users@httpd] Another mod_rewrite question
Posted by Wil Hatfield <wi...@hvhm.net>.
Alltheweb.com keeps listing dynamic URLs by replacing the & in the query
string with & and this isn't acceptable. How can I use mod_rewrite to
change it back so the page will come up properly.
I simply want to replace & with &
Wil
---------------------------------------------------------------------
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
Re: [users@httpd] mod_rewrite question
Posted by Brian Dessent <br...@dessent.net>.
Scott Taylor wrote:
>
> What is the easiest way to rewrite:
> http://username:password@miningstocks.com/protected/archive/(.*)
>
> to: http://miningstocks.com/protected/archive/$1
>
> (i.e. http://username:password@domain.com/protected/archive/test.php
> to http://miningstocks.com/protected/archive/test.php)
This is not possible. The "username:password" is not actually part of
the URL, it is not sent to Apache. If the browser determines that
authentication is necessary to view a page, it will try that user name
and password. But, it's never sent to Apache as a URL in that form, so
what you're asking cannot be done.
The URI part of both of those are the same, i.e. /protected/archive/*.
So, I don't see that there's any difference, from an Apache standpoint,
between those two URLs. In both cases the browser is going to send:
GET /protected/archive/whatever HTTP/1.1
Host: miningstocks.com
(in addition to a number of other headers.) Thus you need to refine
what exactly you're trying to do, as those URLs are indistinguishable to
Apache.
Brian
---------------------------------------------------------------------
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