Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Is it possible to point a URL to a specific page in cPanel?

Say I have foobar.com and there's a page foobar.com/art. Now I also or artbar.com and I want to point it at foobar.com/art how would I do that?

I'm not seeing an option in cPanel to redirect a domain to a specific URL.

share|improve this question

1 Answer 1

You can do this by creating a .htaccess file in the root of artbar.com, then simply add the following line:

redirect 301 / http://newdomain.com/newpath

or if you prefer rewrite method then use something like:

RewriteEngine On
RewriteRule ^(.*)$ http://newdomain.com/newpath [R=301]
share|improve this answer
    
Ahh ok. Well what if I dont have hosting for artbar.com, i JUST own the domain and I change the nameserver on the domain to point to foobar.com? could I have a .htaccess file in the root of foobar.com that would redirect to the appropriate URL? –  rugbert Aug 9 '13 at 20:51
    
Nope, that won't work - you'd need to configure your name server to understand that referring domain. Name Servers on webhosting accounts unless you have a dedicated one using your own name servers which is unlikely unless you've paid extra then your name servers will be hosting 1,000's if not 100,000's of sites. How would they know to point your domain to such your domain? It might work if you have a dedicated IP and point it at the IP, another method could be to use a domain forwarder, many registrars have those... or the best method would be to use the htaccess after setting it up as an –  bybe Aug 9 '13 at 22:08
    
addon domain inside your cpanel. –  bybe Aug 9 '13 at 22:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.