question about DNS records and hosting

dannymyung used Ask the Experts™
I have a domain that's hosted with Network Solutions. I have a completely separate hosting account through ANHosting with a static ip.

How can I allow NS to continue to control the records, but point the A records to my hosting server, so that when it goes to my static IP it goes to a subfolder where this website will be instead of the root? If that doesn't make sense then I can try to explain it another way.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

You can't do this with DNS, you will have to put a redirect in the root directory to send all traffic to the subdirectory.  Tell me what kind of web server, and I will give you the redirect to use.


General server information:
Operating system       Linux
Service Status       Click to View
Kernel version       2.6.18-92.1.22.el5PAE
Machine Type       i686
Apache version       2.2.13 (Unix)
PERL version       5.8.8
Path to PERL       /usr/bin/perl
Path to sendmail       /usr/sbin/sendmail
Installed Perl Modules       Click to View
PHP version       5.2.9
MySQL version       5.0.81-community
cPanel Version       11.24.5-STABLE 38506
Theme       cPanel X v2.6.0
Documentation       Click to View
cPanel Pro       1.0 (RC1)

so php should work, use this:

header( 'Location: /subdirectory' ) ;

Change the word subdirectory above to the name of the subdirectory you want to direct them to.  Only those three lines should be in the file, name it index.php and put it in the root directory of your server.

If that doesn't work, you can use HTML.  Make the same word change, save this one as index.htm or index.html and put it in the root directory.  You can do both if you want, it won't hurt anything.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<title>Page Title</title>
<meta http-equiv="REFRESH" content="0;url="/subdirectory"></HEAD>
Optional page text here.
Acronis in Gartner 2019 MQ for datacenter backup

It is an honor to be featured in Gartner 2019 Magic Quadrant for Datacenter Backup and Recovery Solutions. Gartner’s MQ sets a high standard and earning a place on their grid is a great affirmation that Acronis is delivering on our mission to protect all data, apps, and systems.


Thank you. Is there any way I can preserve the original NS domain name when it's forwarded, or will it show up in the address bar as ""?

It will probably show up with the subdirectory  at the end.  You should be able to use URL rewrite functionality to rewrite the URL so that the subdirectory does not appear.

Tell me the name of the subdirectory and I will find an example that will work.


The full url will be but I'd like it to say just in the address bar


Ah, well see...I tried your index.php method but then it directs all traffic to the subdirectory. I'd like to keep my current website at when someone types in, but when someone types they go to which will actually be

is that possible?
Make a .htaccess file and paste this into it:

Options +FollowSymLinks

RewriteEngine On
RewriteCond %{HTTP_HOST}
RewriteCond %{REQUEST_URI} !opsmarks/
RewriteRule ^(.*)$ opsmarks/$1 [L]


you are awesome, thank you so much

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial