Write a content for .htaccess for all traffic on domain reveieved on http or http://www redirect to https://www
If XAMPP is always redirecting to the dashboard page, it’s likely due to its default configuration settings. When you access http://localhost, XAMPP is configured to redirect to its dashboard or splash page. This behavior is controlled by the Apache configuration files and can be modified if you prefer it to point to another directory or project.
Solution IF YOU HAVE MULTIPLE DOMAIN Hosted at Same Server
$ vi /opt/lampp/htdocs/.htaccess
RewriteEngine On
# Ensure mod_rewrite is enabled
<IfModule mod_rewrite.c>
# Redirect HTTP to HTTPS with www
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
</IfModule>
Solution if you have Single Domain
Modify httpd.conf:
- Open
httpd.confin a text editor. - Look for the
DocumentRootdirective. It might look like this:apacheCopy codeDocumentRoot "C:/xampp/htdocs" - Change the path (
C:/xampp/htdocsin the example) to the directory of your choice where your project or website files are located. - Similarly, find the
<Directory>directive that corresponds to theDocumentRootand change the path there as well.
Latest posts by rajeshkumar (see all)
- The Changing Shape of Technology: From Tools to Thinking Partners - March 9, 2026
- Omnisend vs. Klaviyo: Which Is Best for Agencies - February 19, 2026
- The Cloud Resilience Standard: Synchronizing AWS Migration with Continuous Vulnerability Management - January 21, 2026