How to create alias using xampp?

Member

by dana , in category: PHP General , 7 months ago

How to create alias using xampp?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by rollin , 7 months ago

@dana 

To create an alias using XAMPP, you need to follow these steps:

  1. Open the XAMPP control panel and click on the "Config" button next to Apache.
  2. Select "Apache (httpd.conf)" from the dropdown menu.
  3. This will open the configuration file in a text editor.
  4. Look for the section that starts with "".
  5. Inside this section, you can add your own aliases. The syntax for creating an alias is as follows: Alias /desired-url "/path/to/folder" Replace "/desired-url" with the URL you want to access and "/path/to/folder" with the actual path to the folder on your system. For example: Alias /my-alias "/opt/lampp/htdocs/my-folder"
  6. Save the changes to the configuration file and close the text editor.
  7. Restart the Apache server by stopping and starting it again from the XAMPP control panel.
  8. After restarting, you should be able to access the folder using the specified alias URL. For example, if you created an alias called "/my-alias", you can access it in your browser by entering "http://localhost/my-alias".


Note: Make sure to save a backup of the configuration file before making any changes in case you need to revert back.