Skip to content

Instantly share code, notes, and snippets.

@Pavracer
Created November 18, 2025 03:01
Show Gist options
  • Select an option

  • Save Pavracer/65391483446d793a6715c76380f4e2f6 to your computer and use it in GitHub Desktop.

Select an option

Save Pavracer/65391483446d793a6715c76380f4e2f6 to your computer and use it in GitHub Desktop.
# HTTPS forced by SG-Optimizer
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect HTTP to HTTPS
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Redirect www to non‑www
RewriteCond %{HTTP_HOST} ^www\.nycwheelchairtransportation\.com$ [NC]
RewriteRule ^(.*)$ https://nycwheelchairtransportation.com/$1 [L,R=301]
</IfModule>
# END HTTPS
SetEnv PHPRC /home/customer/www/nycwheelchairtransportation.com/public_html/php.ini
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
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]
</IfModule>
# END WordPress
# BEGIN HttpHeaders
# The directives (lines) between "BEGIN HttpHeaders" and "END HttpHeaders" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeaders
# BEGIN HttpHeadersAuth
# The directives (lines) between "BEGIN HttpHeadersAuth" and "END HttpHeadersAuth" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeadersAuth
# BEGIN HttpHeadersCompression
# The directives (lines) between "BEGIN HttpHeadersCompression" and "END HttpHeadersCompression" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeadersCompression
# BEGIN HttpHeadersContentType
# The directives (lines) between "BEGIN HttpHeadersContentType" and "END HttpHeadersContentType" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeadersContentType
# BEGIN HttpHeadersExpires
# The directives (lines) between "BEGIN HttpHeadersExpires" and "END HttpHeadersExpires" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeadersExpires
# BEGIN HttpHeadersCookieSecurity
# The directives (lines) between "BEGIN HttpHeadersCookieSecurity" and "END HttpHeadersCookieSecurity" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeadersCookieSecurity
# BEGIN HttpHeadersTiming
# The directives (lines) between "BEGIN HttpHeadersTiming" and "END HttpHeadersTiming" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeadersTiming
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML, and fonts
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript application/json
AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-opentype application/vnd.ms-fontobject image/svg+xml
# Exclude already compressed files
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|webp)$ no-gzip dont-vary
</IfModule>
AddHandler application/x-httpd-php84 .php .php5 .php4 .php3
# BEGIN seraphinite-accelerator
# The directives (lines) between "BEGIN seraphinite-accelerator" and "END seraphinite-accelerator" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_mime.c>
AddType image/avif .avif
AddType image/webp .webp
AddType application/font-woff2 .woff2
AddType application/x-font-opentype .otf
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType text/css "access plus 43200 minutes"
ExpiresByType text/javascript "access plus 43200 minutes"
ExpiresByType application/javascript "access plus 43200 minutes"
ExpiresByType application/x-javascript "access plus 43200 minutes"
ExpiresByType font/eot "access plus 43200 minutes"
ExpiresByType font/opentype "access plus 43200 minutes"
ExpiresByType font/woff "access plus 43200 minutes"
ExpiresByType application/vnd.ms-fontobject "access plus 43200 minutes"
ExpiresByType application/font-woff "access plus 43200 minutes"
ExpiresByType application/font-woff2 "access plus 43200 minutes"
ExpiresByType application/x-font-ttf "access plus 43200 minutes"
ExpiresByType application/x-font-woff "access plus 43200 minutes"
ExpiresByType image/vnd.microsoft.icon "access plus 43200 minutes"
ExpiresByType image/x-icon "access plus 43200 minutes"
ExpiresByType image/bmp "access plus 43200 minutes"
ExpiresByType image/gif "access plus 43200 minutes"
ExpiresByType image/jpeg "access plus 43200 minutes"
ExpiresByType image/png "access plus 43200 minutes"
ExpiresByType image/svg+xml "access plus 43200 minutes"
ExpiresByType image/avif "access plus 43200 minutes"
ExpiresByType image/webp "access plus 43200 minutes"
ExpiresByType audio/ogg "access plus 43200 minutes"
ExpiresByType video/mp4 "access plus 43200 minutes"
ExpiresByType video/ogg "access plus 43200 minutes"
ExpiresByType video/webm "access plus 43200 minutes"
</IfModule>
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
FileETag None
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI}?%{QUERY_STRING} \.(jpe|jpg|jpeg|png|gif|bmp|webp|avif)\?(|.*\&)seraph_accel_ai=([\w\-]+)\.([\w\-]+)(\&.*$|$) [NC]
RewriteCond "/home/customer/www/nycwheelchairtransportation.com/public_html/wp-content/cache/seraphinite-accelerator/s/%3/ai/%4.%1" -f
RewriteRule . /wp-content/cache/seraphinite-accelerator/s/%3/ai/%4.%1?%2%5 [L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI}?%{QUERY_STRING} ([^?]+\.(jpe|jpg|jpeg|png|gif|bmp|webp|avif))\?(|.*\&)seraph_accel_ai=([\w\-]+)\.([\w\-]+)(\&[^\s]*) [NC]
RewriteCond "/home/customer/www/nycwheelchairtransportation.com/public_html/wp-content/cache/seraphinite-accelerator/s/%4/ai/%5.%2" !-f
RewriteRule . /?seraph_accel_gi=%1&ai=%4.%5&intrnl=%4&%3%6 [L,R=302]
</IfModule>
<IfModule mod_headers.c>
<FilesMatch \.(jpe|jpg|jpeg|png|gif|bmp|webp|avif)$>
Header merge Vary Accept
Header set X-Seraph-Accel-Cache "state=original; redir=htaccess;"
</FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image\/webp
RewriteCond %{REQUEST_FILENAME} \.(jpe|jpg|jpeg|png|gif|bmp|webp|avif)$
RewriteCond %{REQUEST_FILENAME}.webp -f
RewriteRule ^(.*)\.(jpe|jpg|jpeg|png|gif|bmp|webp|avif)$ $1\.$2\.webp [QSA]
</IfModule>
<IfModule mod_headers.c>
<FilesMatch \.(jpe|jpg|jpeg|png|gif|bmp|webp|avif)\.webp$>
Header merge Vary Accept
Header set X-Seraph-Accel-Cache "state=preoptimized; redir=htaccess;"
</FilesMatch>
</IfModule>
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/plain text/css text/javascript application/javascript application/x-javascript application/json text/html text/xml application/atom+xml application/rss+xml application/xhtml+xml application/xml text/x-component application/vnd.ms-fontobject application/x-font-ttf font/eot font/opentype image/bmp image/svg+xml image/vnd.microsoft.icon image/x-icon
</IfModule>
</IfModule>
<IfModule mod_headers.c>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP:Accept-Encoding} (^|\W)gzip(\W|$)
RewriteCond %{REQUEST_FILENAME} \.(css|js)$
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)\.(css|js)$ $1\.$2\.gz [QSA]
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1,E=no-brotli:1]
RewriteRule \.js\.gz$ - [T=application/javascript,E=no-gzip:1,E=no-brotli:1]
</IfModule>
<FilesMatch \.(js|css)\.gz$>
Header set Content-Encoding gzip
Header merge Vary Accept-Encoding
Header set X-Seraph-Accel-Cache "state=precompressed; redir=htaccess;"
</FilesMatch>
</IfModule>
# END seraphinite-accelerator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment