diff --git a/.htaccess b/.htaccess index ccfec99..bfa517b 100644 --- a/.htaccess +++ b/.htaccess @@ -1,15 +1,15 @@ +Options +FollowSymLinks RewriteEngine On -# Redirect .html URLs to clean URLs (except index.html) -RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC] -RewriteCond %1 !^index$ [NC] -RewriteRule ^ /%1? [NC,L,R=301] - -# Add .html extension to clean URLs +# Internal rewrite for clean URLs to .html files RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d -RewriteCond %{REQUEST_FILENAME} !^.*\.(css|js|png|jpg|jpeg|gif|webp|svg|ico|pdf)$ [NC] -RewriteRule ^([^\.]+)/?$ $1.html [L] +RewriteRule ^about$ about.html [L] +RewriteRule ^services$ services.html [L] +RewriteRule ^portfolio$ portfolio.html [L] +RewriteRule ^gallery$ gallery.html [L] +RewriteRule ^contact$ contact.html [L] +RewriteRule ^qna$ qna.html [L] # Handle 404 errors ErrorDocument 404 /index.html