0

I am developing a site that resides on a different server to where the current site resides.

I am accessing the site via a url such as:

http:// host.server.com.au/~username/

(So i am logging in via http:// host.server.com.au/~username/admin.php and viewing the site at eg, http:// host.server.com.au/~username/index.php/index)

This is causing some issues with links/linked files so i want be be able to access the site via a specific url, such as mytempdomainsite.com.au

I have tried altering my hosts file in such a way:

111.222.33.44 mytempdomainsite.com.au
111.222.33.44/~username/ mytempdomainsite.com.au

however that does not work for me. I have also tried editing the htaccess file with rewrites (found via searching the web), and then editing my system configuration within EE but nothing seems to work.

I have no idea the steps involved in getting this to work for me. The ~username is causing me some grief, so if anyone can help with this it would be deeply appreciated!

1
  • 5
    This question is not related to EE settings.
    – Max Lazar
    Feb 26, 2014 at 10:17

1 Answer 1

2

.host file just overwrite DOMAIN -> IP determination which usually do DNS server before you computer send request to Web server. So you can't manipulate urls on server with it.

Your web server (apache/nginx) must be ready to get request with domain "mytempdomainsite.com.au" (or have default setting for ip) and redirect to your web folder. This is only way. After that you can route you request by htaccess.

3
  • When you say the web server must be ready to get the request and redirect to the web folder.. what would i need to do to accomplish this? (The site is still in development.)
    – ZEDG
    Feb 26, 2014 at 11:22
  • You would need to change the server configuration to add a virtual host to it. I'm assuming this is not a server you have full control of? Feb 26, 2014 at 13:08
  • No i don't have full control, only access to cpanel. What would i be asking the server/hosting admin?
    – ZEDG
    Feb 28, 2014 at 4:52

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