📁 File Manager
Editing:
/home/wedigitalindia/public_html/gayatrisolarpower.com/.htaccess
RewriteEngine On RewriteBase / # ------------------------------------------------ # Force HTTPS + NON-WWW (Remove www) # ------------------------------------------------ RewriteCond %{HTTPS} !=on [OR] RewriteCond %{HTTP_HOST} ^www\.gayatrisolarpower\.com$ [NC] RewriteRule ^ https://gayatrisolarpower.com%{REQUEST_URI} [L,R=301] # ------------------------------------------------ # Skip admin and founder folders (NO rewrite here) # ------------------------------------------------ RewriteCond %{REQUEST_URI} ^/(admin|founder)/ [NC] RewriteRule .* - [L] # ------------------------------------------------ # Custom URLs # ------------------------------------------------ # Service URL RewriteRule ^service/([a-zA-Z0-9-]+)/?$ service-details.php?slug=$1 [L,QSA] # Blog URL RewriteRule ^blogs/([a-zA-Z0-9-]+)/?$ blog-single.php?slug=$1 [L,QSA] # Location URL RewriteRule ^locations/([a-zA-Z0-9-]+)/?$ location-details.php?slug=$1 [L,QSA] # ------------------------------------------------ # Remove .php extension # ------------------------------------------------ RewriteCond %{THE_REQUEST} \s/([^.]+)\.php[\s?] [NC] RewriteRule ^([^.]+)\.php$ /$1 [R=301,L] # ------------------------------------------------ # Internally load .php file # ------------------------------------------------ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^([^/]+)/?$ $1.php [L] # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php80” package as the default “PHP” programming language. <IfModule mime_module> AddHandler application/x-httpd-ea-php80 .php .php8 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit
Save
Cancel