|  Topic awaiting preservation: A common yet confusing .htaccess url redirection question... (Page 1 of 1)  | |
|---|---|
| Paranoid (IV) Inmate From: Northumberland, England |  posted 06-27-2004 13:11 Ok, code: RewriteEngine on Would this work and is this the best way to do something like this? | 
| Paranoid (IV) Mad Scientist with Finglongers From: Germany |  posted 06-27-2004 13:16 aehm... the best way would be for your domains to just point to the different directories, | 
| Paranoid (IV) Inmate From: Northumberland, England |  posted 06-27-2004 13:25 Would that be invisble or would the bobDir actually appear in the address bar (the idea is to avoid that all together) quote: 
 | 
| Paranoid (IV) Mad Scientist with Finglongers From: Germany |  posted 06-27-2004 13:56 yeah, but you shouldn't be able to set documentRoot within .htaccess - only within the real server configuration. | 
| Paranoid (IV) Inmate From: Northumberland, England |  posted 06-27-2004 14:26 Thanks buddy - one day I think I will buy a book on apache and htaccess since it is so useful yet I never get round to learning it properly. Online resources are good, but either not concise enough, or the ones that are concise are also too 'hi-brow' for a lowly designer/developer like myself. | 
| Paranoid (IV) Inmate From: Northumberland, England |  posted 06-28-2004 22:11 ***Edit*** code: RewriteEngine On 
 | 
| Paranoid (IV) Mad Scientist with Finglongers From: Germany |  posted 06-29-2004 16:13 Hm... try adding a [L] - signifing -last rule to apply to your rewriteRules and see if it still runs into the loop. | 
| Paranoid (IV) Inmate From: Northumberland, England |  posted 06-29-2004 18:33 I have tried that, I've also tried escaping the . too | 
| Paranoid (IV) Mad Scientist with Finglongers From: Germany |  posted 06-29-2004 19:03 hm... give this a try code: RewriteEngine On | 
| Paranoid (IV) Inmate From: Madison, Indiana, USA |  posted 06-29-2004 21:12 Try the following: code: RewriteEngine on | 
| Paranoid (IV) Inmate From: Northumberland, England |  posted 06-29-2004 21:52 Hyperbole that seems to have worked great, | 
| Paranoid (IV) Inmate From: Madison, Indiana, USA |  posted 06-30-2004 23:46 smonkey: The double dollar signs are misprints. Change them to read ^(.*)$. If what I gave you worked then Apache must be smart enough to realize you can only get to the end of a line once. code: RewriteCond %{HTTP_HOST}    ^(ww+\.)?scrwd\.com tells Apache to look at the HTTP_HOST variable starting at the beginning look to see if it contains ww, www, wwww, etc followed by a dot. This is optional (the ? following the parentheses makes it optional. This means this line will accept scrwd.com,  ww.scrwd.com, www.scrwd.com, wwww.scrwd.com, etc. | 
| Paranoid (IV) Inmate From: Northumberland, England |  posted 07-01-2004 11:55 Cool, |