Adding correct url for canonical as well as 301 to https

This commit is contained in:
edsea
2024-12-26 01:10:08 +01:00
parent d82a43704e
commit db458d2898
2 changed files with 5 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
RewriteEngine On RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/index\.php[\s?/] [NC] RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/index\.php[\s?/] [NC]
RewriteRule ^index\.php$ / [R=301,L] RewriteRule ^index\.php$ / [R=301,L]
RewriteCond %{REQUEST_FILENAME}.php -f RewriteCond %{REQUEST_FILENAME}.php -f

View File

@@ -32,7 +32,7 @@
<link rel="manifest" href="/rss/favicon/site.webmanifest" /> <link rel="manifest" href="/rss/favicon/site.webmanifest" />
<!-- Canonical Link (for duplicate pages) --> <!-- Canonical Link (for duplicate pages) -->
<link rel="canonical" href="https://stellaamor.com<?php echo $_SERVER['REQUEST_URI'];?>"> <link rel="canonical" href="https://stellaamor.com<?php echo stripslashes($_SERVER['REQUEST_URI']);?>">
<!-- Favicon --> <!-- Favicon -->
<link rel="icon" href="/favicon.ico" type="image/x-icon"> <link rel="icon" href="/favicon.ico" type="image/x-icon">