We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6561
    • 139 Posts
    I’m using Xampp for development & testing, but I’d like the browser to show http://intranet/ instead of http://localhost:8080/ for a specific page. Only one specific page should be rewritten this way.

    How would I do this, use mod_rewrite or something else?

    Note: I’m having Friendly URLs enabled and I don’t want to break anything...

    Thanks in advance!
      • 7923
      • 4,213 Posts
      is this a linux or windows?

      You can add new host in to the hosts file of your computer.

      In windows, look at C:\WINDOWS\system32\drivers\etc\hosts and in linux, I think it’s in /etc/hosts

      In that file, add:

      127.0.0.1       intranet

      And you need to also map it in your apache httpd.conf like:

      <VirtualHost 127.0.0.1>
             ServerName intranet
             DocumentRoot "C:/your/docroot"
      </VirtualHost>

      EDIT: oh and change apache to run in 80 port instead of 8080 if you want to use just http://intranet.. it’s set in the httpd.conf too.

      Also google for more info on apache configuring.. there’s lots of things you can do with virtual hosts for example..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 6561
        • 139 Posts
        Quote from: doze at Mar 10, 2009, 07:41 AM

        is this a linux or windows?

        You can add new host in to the hosts file of your computer.

        In windows, look at C:\WINDOWS\system32\drivers\etc\hosts and in linux, I think it’s in /etc/hosts

        In that file, add:

        127.0.0.1 intranet

        And you need to also map it in your apache httpd.conf like:

        <VirtualHost 127.0.0.1>
        ServerName intranet
        DocumentRoot "C:/your/docroot"
        </VirtualHost>

        EDIT: oh and change apache to run in 80 port instead of 8080 if you want to use just http://intranet.. it’s set in the httpd.conf too.

        Also google for more info on apache configuring.. there’s lots of things you can do with virtual hosts for example..

        I’m using Xampp on a Windows host. I want to show something, but I need a way to camouflage the link... thought about using frames, but that would be a crime to the nice xhtml/css design...