File manager - Edit - /home/monara/public_html/swarnawahini_web/.htaccess
Back
# Enable URL rewriting # ============================== # 0. FORCE REMOVAL of "noindex" # ============================== <IfModule mod_headers.c> Header unset X-Robots-Tag </IfModule> RewriteEngine On # ============================== # 1. Force HTTPS and www # ============================== RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} !^www\.swarnavahini\.lk$ [NC] RewriteRule ^(.*)$ https://www.swarnavahini.lk/$1 [L,R=301] # ============================== # 2. Serve robots.txt dynamically # ============================== RewriteRule ^robots\.txt$ robots.php [L] # ============================== # 3. Serve sitemap.xml dynamically # ============================== RewriteRule ^sitemap\.xml$ sitemap.php [L] # ============================== # 4. Allow Googlebot & Bingbot (fixes HTTP 403) # ============================== <IfModule mod_setenvif.c> SetEnvIfNoCase User-Agent "Googlebot" allow_bot SetEnvIfNoCase User-Agent "Bingbot" allow_bot </IfModule> <IfModule mod_authz_core.c> <RequireAny> Require env allow_bot Require all granted </RequireAny> </IfModule> # ============================== # 5. Security: prevent access to hidden files (.htaccess, .git, etc.) # ============================== <FilesMatch "^\..*"> Require all denied </FilesMatch> # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php74” package as the default “PHP” programming language. <IfModule mime_module> AddHandler application/x-httpd-ea-php74 .php .php7 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings