gpt-4o-2024-08-06· OpenAI
WildChat-4.8M (AI2)
Whats wrong with my htaccess file: RewriteEngine On RewriteCond %{HTTPS} off RewriteCond…
- User
Whats wrong with my htaccess file: RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI}!^/cdn.ico [NC] RewriteCond %{REQUEST_URI}!^/cdn.css [NC] RewriteCond %{REQUEST_URI}!^/cdn.js [NC] RewriteRule ^(.*)1 [R,L]
- Assistant
Your
.htaccessfile contains several components meant for URL rewriting and HTTPS redirection, but there are a few issues and improvements you can consider:-
Port Condition:
- There's a condition checking for the server port (
%{SERVER_PORT}) being80. This isn't necessary when you already haveRewriteCond %{HTTPS} off. If HTTPS is off, it typically means the request came through HTTP, which usually means port 80.
- There's a condition checking for the server port (
-