How to change local URL on IIS

Asked

Viewed 3,263 times

0

In the local environment of development I always used localhost to access the application, but would like to use friendlier Urls (for example: http://system analysis), I tried setting up on IIS, but I was unsuccessful. I would like to know how I can be performing this setup.

I use the Windows 10, with the IIS see. 10*.

  • Installed IIS in your development environment or using IIS Express itself?

1 answer

2


Open the program notepad.exe as administrator, then do the following:

  1. Go to Filing cabinet > Open up...
  2. Clear the way [drive]:\[pasta windows]\system32\drivers\etc\hosts (in most cases is c:\windows\system32\drivers\etc\hosts)

It should open something like:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost

Add this after # ::1 localhost:

#   ::1             localhost
   127.0.0.1       analise-sistema

Save the document.

Note: An important thing, sometimes Antivirus blocks file editing hosts, so it is necessary to disable it while editing and activate it again soon after saving your document.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.