📁 File Manager
Editing:
/home/wedigitalindia/www/jaybalajiassociates.com/.htaccess
RewriteEngine On RewriteBase / # Block random spam URLs without equals sign RewriteCond %{QUERY_STRING} ^p[^=&]{5,}/?$ [NC] RewriteRule ^$ - [R=404,L] # Block Japanese SEO spam using random p parameter RewriteCond %{QUERY_STRING} (^|&)p=[^&]*[A-Za-z][^&]*(&|$) [NC] RewriteRule ^ - [R=404,L] # Block suspicious category/item spam URLs RewriteRule ^category/item(/.*)?$ - [R=404,L,NC] # RewriteRule ^location/privacy-policy(/.*)?$ - [R=404,L,NC] # EXCLUDE ADMIN RewriteRule ^admin(/.*)?$ - [L] # ---------------------------------- # 1. Force HTTPS + non-www (PUBLIC SITE ONLY) # ---------------------------------- RewriteCond %{HTTPS} !=on [OR] RewriteCond %{HTTP_HOST} ^www\.jaybalajiassociates\.com$ [NC] RewriteRule ^(.*)$ https://jaybalajiassociates.com/$1 [L,R=301] # ---------------------------------- # 2. Remove index.php (PUBLIC SITE ONLY) # ---------------------------------- RewriteRule ^index\.php$ https://jaybalajiassociates.com/ [L,R=301] # ---------------------------------- # 3. Redirect .php URLs to clean URLs # ---------------------------------- RewriteCond %{THE_REQUEST} \s/+(.+?)\.php[\s?] [NC] RewriteRule ^ %1 [L,R=301] # ---------------------------------- # Static pages # ---------------------------------- RewriteRule ^about/?$ about.php [L] RewriteRule ^gallery/?$ gallery.php [L] RewriteRule ^contact/?$ contact.php [L] # ---------------------------------- # Special product category redirects # ---------------------------------- # RewriteRule ^products/solar-water-heater/?$ solar-water-heater.php [L,QSA] # RewriteRule ^products/solar-water-pump/?$ solar-water-pump.php [L,QSA] # ---------------------------------- # Product category # ---------------------------------- RewriteRule ^products/([^/]+)/?$ products.php [L,QSA] # ---------------------------------- # Single product # ---------------------------------- RewriteRule ^product/([^/]+)/?$ product-detail.php [L,QSA] # ---------------------------------- # Products listing # ---------------------------------- RewriteRule ^products/?$ product-categories.php [L,QSA] # ---------------------------------- # Services # ---------------------------------- RewriteRule ^services/?$ services-list.php [L,QSA] RewriteRule ^services/([^/]+)/?$ service.php [L,QSA] # ---------------------------------- # Solutions # ---------------------------------- RewriteRule ^solutions/([^/]+)/?$ solution.php [L,QSA] # ---------------------------------- # Blog listing # ---------------------------------- RewriteRule ^blogs/?$ blogs.php [L,QSA] # ---------------------------------- # Blog # ---------------------------------- RewriteRule ^blog/([^/]+)/?$ blog-detail.php [L,QSA] # ---------------------------------- # Location # ---------------------------------- RewriteRule ^location/?$ locations.php [L,QSA] RewriteRule ^location/([^/]+)/?$ location.php?slug=$1 [L,QSA] RewriteRule ^form-process/?$ form-process.php [L] RewriteRule ^about2/?$ about2.php [L] # ---------------------------------- # Custom 404 # ---------------------------------- ErrorDocument 404 /404.php # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php82” package as the default “PHP” programming language. <IfModule mime_module> AddHandler application/x-httpd-ea-php82 .php .php8 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit
Save
Cancel