Jump to content

fitguydan

New Members
  • Posts

    5
  • Joined

  • Last visited

fitguydan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sorry for the confusion, I'll address your questions: I have a main website that let's users have their own custom.mainsite.com. Along with that, their pages are at custom.mainsite.com/blog or anything else after the '/' I need an added feature that lets a user register their own domain(any registrar.. doesn't matter), point the nameservers to my server(I would give directions on how they can do that), and then I take the 3rd step and make it so that when someone visits theirdomain.com, it shows the content of custom.mainsite.com, but without changing the address bar. Similarly,I want any other pages like theirdomain.com/blog to show the content of custom.mainsite.com/blog. Wordpress and wix(and many others) do this, but I don't know WP(and obviously can't see how wix codes their custom domains) so I just don't know the best way to accomplish this. I have a working way, which I posted above, but since I'm new to this process, I may be making it way harder on myself or the server with the method I used.
  2. UPDATE: I found some code that appears to work exactly as I wanted, but since I'm very new to this process, is this a bad way to do it? Or a better question: is there a better or more efficient way to do this? Basically, I added the domain.com to my server through WHM. And in the root directory of the newly added domain, the only file is the htaccess file and in it(among a few security lines), there is: RewriteCond %{HTTP_HOST} ^(www.)?newdomain\.com$ [NC] RewriteRule ^(.*)$ http://test.othersite.com/$1 [P,L,NC,QSA] It works, but like I said, is there a cleaner or better way to do this?
  3. Haha, I actually fixed that initial problem from my thread and edited my post to a different, but similar problem.
  4. My service allows users to generate subdomains based off their username(testguy.mydomain.com). I've created a wildcard subdomain for this, so the dynamic subdomains work wonderfully. I've added a parked domain where my domain is supposed to mirror the given subdomain. However, when I go to the domain.com, it redirects to the subdomain, changing the URL in the address bar. Any ideas? Or if there a better way to mirror a subdomain while showing the original domain in the address bar?
  5. I did a project for a client over a year ago and never ran into this problem on their shared server, but now I'm having this problem on my own... and I'm not sure why. I want to give free members their own subdomain. I want the php files to scan the subdomain to determine which pages to display. So like my index.php would scan the subdomain and show the corresponding user's home page so that if you go to someguy.thisdomain.com, it would really just scan index.php at thisdomain.com and act accordingly. On the other project, no extra folders were created. I know that subdomains can be created in cpanel and then extra folders would be added and whatnot, but I was able to effectively use subdomains for users without htaccess or any sort of cpanel functions. The main problem is when I test subdomains. I have php code that just echos "Subdomain is blah" and it works when I go to www.mydomain.com and also just mydomain.com, but when I go to test.mydomain.com, it gives an error as if the domain doesn't exist.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.