ServerName api.hampton.website DocumentRoot /var/www/html/hampton/public_html/api/ TimeOut 3600 RewriteEngine On # test string is a valid files RewriteCond %{SCRIPT_FILENAME} !-f # test string is a valid directory RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php?uri=/$1 [NC,L,QSA] # with QSA flag (query string append), # forces the rewrite engine to append a query string part of the # substitution string to the existing string, instead of replacing it. Options +Indexes # Some rewrite rules in this file were disabled on your HTTPS site, # because they have the potential to create redirection loops. # RewriteCond %{SERVER_NAME} =api.tldrpost.com # RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] SSLCertificateFile /etc/letsencrypt/live/api.hampton.website/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/api.hampton.website/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf SSLCertificateChainFile /etc/letsencrypt/live/api.hampton.website/chain.pem