Skip to content

Instantly share code, notes, and snippets.

@shuson
Created July 16, 2019 08:27
Show Gist options
  • Save shuson/f50a05255c26f8dcfbe9ea5a939cc462 to your computer and use it in GitHub Desktop.
Save shuson/f50a05255c26f8dcfbe9ea5a939cc462 to your computer and use it in GitHub Desktop.
Frontend Project httpd rewrite rule
Listen 9090 # some port
<VirtualHost 172.0.0.1:9090>
DocumentRoot /var/www/project
#ServerName is fine to not specified
<Directory /var/www/project>
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
RewriteRule ^ /index.html [L]
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment