Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-22-2007, 04:18 AM   #1
LQ Newbie
Registered: Mar 2006
Posts: 4

Rep: Reputation: 0
Redirect URL to localhost

Hi apologies if this question has been asked a thousand times before (But I did search the threads that the forums AI suggest before I posted)...

I have managed to install linux (SUSE - install went like a dream) and I'm hoping to use it as my main development box however I've hit one wall that I don't seem to be able to resolve.

I think what I want to be able to do is to locally resolve my clients domains on this box.

I'll try and explain better with an example.

I have a client who has an existing live web site URL ""

Instead of typing a development URL of http://localhost/~myclient in my browser I want to get apache to resolve requests to to go to http://localhost/~myclient instead of the current live web site.

Is what I'm trying to achieve possible?

If it is can anyone tell me how, or point me in the direction of a tut on it?

Old 10-22-2007, 04:28 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
would an entry to /etc/hosts pointing that name to not suffice? you wouldn't be able to route to that hostname, but i guess that's imaterial really. you could also use a browser plugin for developers which allows you to specify arbitrary headers, i.e. in firefox you could go to but include a HOST header for the clients domain name which apache would then act upon. i expect a /etc/hosts is probably all you really want.
Old 10-22-2007, 06:03 AM   #3
LQ Newbie
Registered: Mar 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Sounds like the solution


As always, what seems insurmountable is actually very simple...

I haven't tried your suggested solution yet (I will later), but it seems to make perfect sense. I will try it in a little while when I've a couple of mins. - It a typical Monday morning here and the phone hasn't stopped ringing!

I will update the thread to let you know how I get on.

Old 10-22-2007, 09:39 AM   #4
LQ Newbie
Registered: Mar 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Thumbs up Close message

Hi acid_kewpie.

I have now had a chance to amend my local hosts file /etc/hosts and as per your advice my clients domain now resolves to my local machine. The key thing is that now the address in the address bar says my clients URL.

The reason that I needed this to resolve locally was that my client wants google maps and that requires you register the live domain. Now that I have their domain resolving to my local machine I can incorporate the maps locally without having to try to develop the page using their live site.

Many, many thanks


Last edited by beachcomber; 10-22-2007 at 09:55 AM. Reason: Typo


apache, localhost, resolve

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
redirect url munna_dude Linux - Software 2 02-15-2007 01:18 AM
url redirect Present Linux - Networking 4 01-26-2007 10:08 AM
Apache URL redirect problem kdogksu Linux - Networking 2 03-26-2005 03:22 PM
URL Redirect (with Masking) BxBoy General 0 03-11-2003 10:44 PM
Apache Virtual URL Redirect nxny Linux - Software 0 07-19-2002 03:36 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:31 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration