Website URL
https://designprocess.great-site.net/
Error Message
N/A
Other Information
I just want my OG image to show up on Social Media I tried everything also whenever I try to create htacess it deletes itself and yes I put it inside my htdoc folder
.htaccess (3 KB)
# Enable RewriteEngine
RewriteEngine On
# ----------------------------
# URL Rewriting
# ----------------------------
# Remove trailing slash (except for directories)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Remove .php extension from URLs
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ /$1.php [L]
# Remove .html extension from URLs
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ /$1.html [L]
# Redirect .php and .html URLs to extensionless versions
RewriteCond %{THE_REQUEST} \s/([^/?]+)\.php[\s?] [NC]
RewriteRule ^ /%1 [R=301,L]
RewriteCond %{THE_REQUEST} \s/([^/?]+)\.html[\s?] [NC]
RewriteRule ^ /%1 [R=301,L]
# ----------------------------
# Open Graph (OG) Configuration
# ----------------------------
# Ensure robots.txt is accessible
<Files "robots.txt">
Order Allow,Deny
Allow from all
</Files>
# Enable CORS for images (allow OG crawlers to access images)
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
# Set MIME types for images to ensure they are properly served
AddType image/jpg .jpg
AddType image/jpeg .jpeg
AddType image/png .png
AddType image/gif .gif
# ----------------------------
# Caching Rules for Better Performance
# ----------------------------
<IfModule mod_expires.c>
ExpiresActive On
# HTML files - cache for 0 seconds (dynamic content)
ExpiresByType text/html "access plus 0 seconds"
# CSS and JavaScript - cache for 0 seconds (always revalidate)
ExpiresByType text/css "access plus 0 seconds"
ExpiresByType application/javascript "access plus 0 seconds"
ExpiresByType application/x-javascript "access plus 0 seconds"
# Images - cache for 1 month
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType image/webp "access plus 1 month"
# Fonts - cache for 1 year (no changes)
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/font-woff2 "access plus 1 year"
# PDF files - cache for 1 month (no changes)
ExpiresByType application/pdf "access plus 1 month"
# Video and audio - cache for 1 month
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType audio/mpeg "access plus 1 month"
</IfModule>
# ----------------------------
# Remove ?i=1
# ----------------------------
RewriteCond %{QUERY_STRING} ^(.*)i=[^&]+(.*)$ [NC]
RewriteRule ^(.*)$ /$1?%1%2 [R=301,L]
# Optional: Redirect www to non-www (or vice versa)
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# Optional: Force HTTPS (uncomment to enable)
# RewriteCond %{HTTPS} !=on
# RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Handle 404 errors gracefully (optional)
ErrorDocument 404 /404.html
robots.txt
# Block all crawlers from the "sections" folder
User-agent: *
Disallow: /sections/
# Allow Facebook's crawler
User-agent: facebookexternalhit
Disallow:
# Allow Twitter's crawler
User-agent: Twitterbot
Disallow:
# Allow LinkedIn's crawler
User-agent: LinkedInBot
Disallow:
robot.txt (288 Bytes)