Powered by Blogger.

How to Redirect Laravel Into Local Domain


Normally if you are using Laravel and XAMPP on local computer, you are using the address “localhost/basicwebsite/public” (project name : basicwebsite) to access website. If you want to access more simple use the local domain (example basicwebsite.id), you can follow some steps below :

Edit file httpd-vhosts.conf which located in xampp/apache/conf/extra using notepad and add script below :

 <VirtualHost *:80>  
 DocumentRoot "C:/xampp/htdocs/basicwebsite/public"  
 ServerName basicwebsite.id  
 </VirtualHost>  

Edit file hosts which located in C:\Windows\System32\drivers\etc and add a script below :

 127.0.0.1 basicwebsite.id  

Restart your apache service and now you can access your website use address basic website.id in your local computer.

No comments