Forum Moderators: phranque

Message Too Old, No Replies

.htaccess Question

Need help rewriting

         

walkingkeyboard

12:49 pm on Apr 11, 2007 (gmt 0)

10+ Year Member



I use BlueHost, and currently have two addon domains. Each addon domain has a "dev" subdomain. cPanel directs both dev.addon1.com and dev.addon2.com to public_html/dev. I am trying to rewrite dev.addon1.com as addon1.com/dev and the same with addon2 using .htaccess. Here's what I've got so far.

public_html/dev/.htaccess START

RewriteEngine On

RewriteCond %{HTTP_HOST} ^dev.addon1.com$
RewriteRule ^(.*)$ ../addon1/dev/$1 [L]

RewriteCond %{HTTP_HOST} ^dev.addon2.com$
RewriteRule ^(.*)$ ../addon2/dev/$1 [L]

public_html/dev/.htaccess END

I think you can see what I'm trying to do here. What's wrong with my code?

jdMorgan

2:26 pm on Apr 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



.htaccess is applied in the HTTP request context. Therefore, for security reasons, it cannot be used to modify the filepath to point *above* DocumentRoot.

Jim