check it out and corect for me # BEGIN WP Rocket
# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset UTF-8
# Force UTF-8 for a number of file formats
AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml
# FileETag None is not enough for every server.
Header unset ETag
# Since we’re sending far-future expires, we don’t need ETags for static content.
# developer.yahoo.com/performance/rules.html#etags
FileETag None
Header set X-Powered-By "WP Rocket/3.17.3.1"
Header unset Pragma
Header append Cache-Control "public"
Header unset Last-Modified
Header unset Pragma
Header append Cache-Control "public"
AddType image/avif avif
AddType image/avif-sequence avifs
# Expires headers (for better cache control)
ExpiresActive on
ExpiresDefault "access plus 1 month"
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Your document html
ExpiresByType text/html "access plus 0 seconds"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# Feed
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/atom+xml "access plus 1 hour"
# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
# Media: images, video, audio
ExpiresByType image/gif "access plus 4 months"
ExpiresByType image/png "access plus 4 months"
ExpiresByType image/jpeg "access plus 4 months"
ExpiresByType image/webp "access plus 4 months"
ExpiresByType video/ogg "access plus 4 months"
ExpiresByType audio/ogg "access plus 4 months"
ExpiresByType video/mp4 "access plus 4 months"
ExpiresByType video/webm "access plus 4 months"
ExpiresByType image/avif "access plus 4 months"
ExpiresByType image/avif-sequence "access plus 4 months"
# HTC files (css3pie)
ExpiresByType text/x-component "access plus 1 month"
# Webfonts
ExpiresByType font/ttf "access plus 4 months"
ExpiresByType font/otf "access plus 4 months"
ExpiresByType font/woff "access plus 4 months"
ExpiresByType font/woff2 "access plus 4 months"
ExpiresByType image/svg+xml "access plus 4 months"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
# CSS and JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
# Gzip compression
# Active compression
SetOutputFilter DEFLATE
# Force deflate for mangled headers
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
# Don’t compress images and other uncompressible content
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|rar|zip|exe|flv|mov|wma|mp3|avi|swf|mp?g|mp4|webm|webp|pdf)$ no-gzip dont-vary
# Compress all output labeled with one of the following MIME-types
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript \
application/json \
application/rss+xml \
application/vnd.ms-fontobject \
application/x-font-ttf \
application/xhtml+xml \
application/xml \
font/opentype \
image/svg+xml \
image/x-icon \
text/css \
text/html \
text/plain \
text/x-component \
text/xml
Header append Vary: Accept-Encoding
# END WP Rocket
RewriteEngine On
RewriteEngine On
################################################################################
# 1) Keep AMP for date-based posts: /YYYY/MM/DD/post-slug/amp(/anything)
RewriteCond %{REQUEST_URI} ^/(\d{4}/\d{2}/\d{2}/[^/]+)/amp(/.*)?$ [NC]
RewriteRule ^ - [L]
# 2) Keep AMP for tags: /tag/tagname/amp(/anything)
RewriteCond %{REQUEST_URI} ^/tag/([^/]+)/amp(/.*)?$ [NC]
RewriteRule ^ - [L]
################################################################################
# 3) Remove trailing junk from date-based posts
# e.g., /YYYY/MM/DD/post-slug/JUNK -> /YYYY/MM/DD/post-slug
RewriteCond %{REQUEST_URI} ^/(\d{4}/\d{2}/\d{2}/[^/]+)/.+$ [NC]
RewriteRule ^(\d{4}/\d{2}/\d{2}/[^/]+)/.*$ /$1 [R=301,L]
# 4) Remove trailing junk from tags
# e.g., /tag/tagname/JUNK -> /tag/tagname
RewriteCond %{REQUEST_URI} ^/tag/([^/]+)/.+$ [NC]
RewriteRule ^tag/([^/]+)/.*$ /tag/$1 [R=301,L]
# BEGIN WordPress
# التعليمات (الأسطر) بين "BEGIN WordPress" و "END WordPress"
# تم إنشاؤها ديناميكيًا، ويجب تعديلها فقط من خلال مرشحات ووردبريس (WordPress Filters).
# أي تغييرات على التعليمات بين هذه العلامات سيتم الكتابة فوقها.
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
# BEGIN PHP Configuration
php_flag display_errors Off
php_value max_execution_time 300
php_value memory_limit 1024M
php_value post_max_size 228M
php_value upload_max_filesize 256M
# END PHP Configuration
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php81” package as the default “PHP” programming language.
AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
# php -- END cPanel-generated handler, do not edit
# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
Header always set Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self';"
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-XSS-Protection "1; mode=block"
php_flag display_errors Off
php_value max_execution_time 300
php_value max_input_time 300
php_value max_input_vars 5000
php_value memory_limit 1024M
php_value post_max_size 228M
php_value session.gc_maxlifetime 3600
php_value session.save_path "/var/cpanel/php/sessions/ea-php81"
php_value upload_max_filesize 256M
php_value auto_prepend_file '/home/watanser/public_html/wordfence-waf.php'
php_flag zlib.output_compression Off
php_flag display_errors Off
php_value max_execution_time 300
php_value max_input_time 300
php_value max_input_vars 5000
php_value memory_limit 1024M
php_value post_max_size 228M
php_value session.gc_maxlifetime 3600
php_value session.save_path "/var/cpanel/php/sessions/ea-php81"
php_value upload_max_filesize 256M
php_value auto_prepend_file '/home/watanser/public_html/wordfence-waf.php'
php_flag zlib.output_compression Off
# END cPanel-generated php ini directives, do not edit