Remove www site-wide, force https on certain directories and http on the rest?

前端 未结 4 1359
野的像风
野的像风 2020-12-08 05:50

Firstly, I would like to remove the www. from my domain name

http://www.example.com => http://example.com

I would also like for certain directories to be sec

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-08 06:12

    After reading this all post time line i have get success for following error: My website(c4dprime.com) was attached https: in mozilla firefox browser. Google and internet explore are show domain address as http: (The real problem in firefox) I did not want https: for my domain in any browser because one unknow redirect attached with my domain by https: (Cause for this error)after Installing following plugins in wordpress,(Easy redirect for ssl).... I have told to every one do not use any low level plugins for wordpress.

    Anyway! After reading many articles and tutorials at this topic via google search engine. Now i am happy to say i have solve this problem from this post tips. Remember one thing about me i am new to in this form and wordpress.

    This tip is help full for me

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{HTTP_HOST} ^www\.yoursite\.com$ [NC]
    RewriteRule ^(.*)$ http://yoursite.com/$1 [L,R=301]
    

    After edit or some changes in my .htaccess file following code i have use now with solved this error.

    AddHandler c4d-prime .com
    
    # BEGIN WordPress
    
    RewriteEngine On
    RewriteCond %{HTTPS} on
    RewriteBase /
    RewriteRule ^$ http://www.c4dprime.com/ [R=301,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    
    # END WordPress
    

提交回复
热议问题