cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use my domain name to point to a url? eg mydoamin.com/xyz to xyz.com

shemirani
Newbie
Posts: 3
Registered: ‎10-11-2014

How do I use my domain name to point to a url? eg mydoamin.com/xyz to xyz.com

I want to use my own domain name to point to a url. For example, by typing mydomain.com/xyz, I would be redirected to xyz.com.
5 REPLIES
Community Gaffer
Community Gaffer
Posts: 13,575
Thanks: 1,252
Fixes: 103
Registered: ‎04-04-2007

Re: How do I use my domain name to point to a url? eg mydoamin.com/xyz to xyz.com

You could create a 301 redirect by adding the following to an .htaccess file:

RewriteEngine On
Redirect 301 /xyz http://xyz.com

After browsing to mydomain.com/xyz, the URL in the address bar would change to xyz.com. Not sure if that's what you're after or not?

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

shemirani
Newbie
Posts: 3
Registered: ‎10-11-2014

Re: How do I use my domain name to point to a url? eg mydoamin.com/xyz to xyz.com

Hi Bob,
Tnx for your reply.  I want anybody who types www.mydomain.com/xyz to be directed to www.xyz.com. ; I think this is called web forwarding. I want to know in details how this can be done using plusnet as they are maintaining my domain name.
Faramarz
Community Gaffer
Community Gaffer
Posts: 17,680
Thanks: 665
Fixes: 166
Registered: ‎05-04-2007

Re: How do I use my domain name to point to a url? eg mydoamin.com/xyz to xyz.com

Hi,
The 301 redirect Bob has provided should allow you to do this in the manner you're looking for. You'd need to create the .htaccess file and upload to your webspace with the relevant directory and domain names replaced.
If this post resolved your issue please click the 'This fixed my problem' button
 Chris Parr
 Plusnet Staff
shemirani
Newbie
Posts: 3
Registered: ‎10-11-2014

Re: How do I use my domain name to point to a url? eg mydoamin.com/xyz to xyz.com

Hi Chris,
Thank you for your reply.  I am new to this.  Would you kindly provide step by step instructions for creating and editing the .htaccess file and uploading  to my webspace?
Regards,
Faramarz
Community Gaffer
Community Gaffer
Posts: 13,575
Thanks: 1,252
Fixes: 103
Registered: ‎04-04-2007

Re: How do I use my domain name to point to a url? eg mydoamin.com/xyz to xyz.com

You need to create a file called '.htaccess' (minus quotes, and notice the '.' at the start') that contains the following (substituting the necessary with your own domain names):
RewriteEngine On
Redirect 301 /xyz http://xyz.com

And then upload it to the /htdocs folder on your webspace.
It might help to create a text file containing the above, upload it, and then rename it to '.htaccess' once uploaded.
Also, make sure your FTP client is configured to show hidden files.

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵