Help ATS with a contribution via PayPal:
learn more

Subdomain redirect to subfolder, RewriteEngine On and httpd.conf issue in linux!

page: 1
0

log in

join

posted on Oct, 2 2012 @ 07:30 PM
link   
Hey all,

I've purchased a cloud vps, have my own domain www.tochangetheworld.net.

I also have my directory structure as:

/var/www/html/

The subdirectories are in /subs/ which i want to make as subdomains.

I have /var/www/html/subs/raversinuk/index.php

This can be accessed via www.tochangetheworld.net...

However the problem is, that I should be able to access it via raversinuk.tochangetheworld.net... - subdomain.

I have edited httpd.conf in my CentOS (Linux distro) to show this:

PasteBin - Code for httpd.conf

I don't know what I'm doing wrong, i cannot access raversinuk.tochangetheworld.net...

Basically ANY subdirectory i create should be accessed via the subdomain version of it...

Your assistance would be appreciated


Kind Regards
Marty

PS: Just to note - formatting in ATS removes some of the code in the quote...made pastebin code
edit on 12/10/2 by Im a Marty because: (no reason given)
edit on 12/10/2 by Im a Marty because: (no reason given)




posted on Oct, 2 2012 @ 08:16 PM
link   
Dont know anything about linux


Have you actualy created a subdomain, I dont mean just a folder?



posted on Oct, 2 2012 @ 11:18 PM
link   
reply to post by VoidHawk
 


Hey mate, thanks for the reply, i managed to get it to work...

Pastebin - code that works

This is the code that I put in .htaccess

Works like a charm.

No need to create subdomains - i just create a directory and it points it from a rewrite.





new topics
 
0

log in

join