Re: simple mod_rewrite question
| From: | Justin French | Date: | Sat, 17 Jan 2004 06:26:37 +0000 |
| Subject: | Re: simple mod_rewrite question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174911@lists.php.net to get a copy of this message | ||
On Saturday, January 17, 2004, at 10:04 AM, Scott Taylor wrote:
What is the simplist way to do change http://username:password@miningstocks.com/protected/archive/$file to http://miningstocks.com/protected/archive/$file where $file is a variable (indicating any file in that directory or any subdirectory)?That's entirely an Apache question, not PHP... unless of course you were hoping that $file was a PHP variable (which can't be done, because the rewrite happens before PHP parses anything). Try an Apache list, and modify your query to: rewrite: http://username:password@domain.com/protected/archive/(.*) to: http://miningstocks.com/protected/archive/$1 The rewrite is EASY, but I've never dealt with domains and http auth stuff sorry. Justin French