show domain.com/content in subdomain.domain.com

Using mod_rewrite to handle various content issues

show domain.com/content in subdomain.domain.com

Postby pavn » Mon May 12, 2008 4:53 am

I created subdomain of my domain.com: subdomain.domain.com.
The website content for subdomain is stored in domain.com/content.

I am quite new to mod_rewrite and would like to achieve this:

I want to show domain.com/content for subdomain.domain.com URL.
The URL in browser should be: subdomain.domain.com.

Thanks very in advance
pavn
 
Posts: 3
Joined: Mon May 12, 2008 4:34 am

Postby richardk » Mon May 12, 2008 1:57 pm

What currently happens when you go to the sub domain?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby pavn » Mon May 12, 2008 8:44 pm

There is index.php which is displayed. I renamed the file to _index.php and tried to create own .htaccess file which I uploaded there but was not able to create file which would display subdomain.domain.com in URL and would display content of domain.com/content. I was only be able to create redirection.
pavn
 
Posts: 3
Joined: Mon May 12, 2008 4:34 am

Postby pavn » Mon May 12, 2008 8:50 pm

Absolute path to domain.com/content on FTP is:
/var/www/web5/domain.com/domain.com/content

Absolute path to subdomain.domain.com on FTP is:
/var/www/web5/domain.com/subdomain.domain.com
pavn
 
Posts: 3
Joined: Mon May 12, 2008 4:34 am

Postby richardk » Tue May 13, 2008 3:31 pm

Mod_rewrite cannot rewrite from /var/www/web5/domain.com/subdomain.domain.com to /var/www/web5/domain.com/domain.com/content. Try creating a Symbolic Link instead.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Content

Who is online

Users browsing this forum: No registered users and 2 guests

cron