Domain Forwarding

S

Safalra

kwaj said:
I was wondering if there was any standard scripts outthere which would
forward a sub-domain to another page? I have a domain name,
http://mydomainname.com for example. I would like a subdomain,
http://mydomainname.com/subdomain to be automatically forwarded to another
URL, let's say http://anotherurl.com .

On what server is your site hosted? In Apache forwarding is done
through .htaccess. I far as I know you put this line in the .htaccess
file in the subdirectory:

ErrorDocument 301 http://anotherurl.com

Don't quote me on that though, as I've never actually used .htaccess.

By the way, a subdomain in something of the form
http://subdomain.example.com/, and not http://example.com/subdomain/.
 
T

Terry Stockdale

On what server is your site hosted? In Apache forwarding is done
through .htaccess. I far as I know you put this line in the .htaccess
file in the subdirectory:

ErrorDocument 301 http://anotherurl.com

Don't quote me on that though, as I've never actually used .htaccess.

By the way, a subdomain in something of the form
http://subdomain.example.com/, and not http://example.com/subdomain/.

If you're going to use ErrorDocument, it would be "404"
ErrorDocument 404 http://example.com

You might have been thinking of the 301 redirect:
Redirect 301 /subdomain http://example.com

These would be in your .htaccess at your DocumentRoot. Again, these
are when you are using Apache. If you are using IIS as your web
server, do some Google searching for answers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top