.htaccess - HTTPS Redirect with htaccess and drop file extension -




currently installing ssls on numerous sites looking perfect solution redirect http https

i have looked @ various answers on here none work perfectly.

i need able redirect http:// , http://www , www https://

the web pages have .php extension removed via htaccess , want keep this.

current code is

options -multiviews rewriteengine on rewritebase / rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d #rewriterule ^(.*)$ $1.php [l] rewriterule ^([^\.]+)$ $1.php [nc,l] rewritecond %{http_host} ^www\.(.*)$ [nc] rewriterule ^(.*)$ http://%1/$1 [r=301,l] rewritecond %{https} !=on rewriterule ^ https://%{http_host}%{request_uri} [l,r=301]\ 

now works can see on - http://trojandriveways.co.uk, when on child page such https://trojandriveways.co.uk/free-design.php .php extension there , removing.

please can have amended htaccess file code fix issues! been trying days now.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -