Skip to content

Instantly share code, notes, and snippets.

View shahaj90's full-sized avatar
🏠
Working from home

Md. Golam Shahajuddin shahaj90

🏠
Working from home
View GitHub Profile
@shahaj90
shahaj90 / .htaccess
Last active December 25, 2024 18:13
Nuxtjs htaccess file for cPanel
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
@shahaj90
shahaj90 / .htaccess
Last active March 9, 2024 17:17
Laravel htaccess file for cPanel
<IfModule mod_rewrite.c>
# That was ONLY to protect you from 500 errors
# if your server did not have mod_rewrite enabled
RewriteEngine On
# RewriteBase /
# NOT needed unless you're using mod_alias to redirect
RewriteCond %{REQUEST_URI} !/public
RewriteRule ^(.*)$ public/$1 [L]
@shahaj90
shahaj90 / .htaccess
Last active March 9, 2024 17:16
Nextjs htaccess file for cPanel
<IfModule mod_rewrite.c>
RewriteEngine on
# Remove trailing slash if it exists
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Serve HTML files without extension
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html [NC,L]
</IfModule>