admin管理员组文章数量:1122846
I have activated SSL to my site
On my wordpress multisite, I am getting 404 errors when I am entering a correct url for example it automatically redirecting and giving
Is there any code that i need to add or remove in the .htaccess code to get this fixed?
I have activated SSL to my site
On my wordpress multisite, I am getting 404 errors when I am entering a correct url for example http://site.org/wp-admin
it automatically redirecting and giving https://site.org/wp-adminwp-admin
Is there any code that i need to add or remove in the .htaccess code to get this fixed?
Share Improve this question edited Dec 28, 2013 at 7:13 user3131603 asked Dec 27, 2013 at 5:54 user3131603user3131603 12 bronze badges 2- We need to see your .htaccess file and wp-config.php definitions that you have added. – user42826 Commented Dec 27, 2013 at 7:17
- Please edit your answer to include the code in your wp-config.php file. – Justin Waulters Commented Jul 10, 2019 at 2:12
2 Answers
Reset to default 0Sounds like your Apache httpd.conf is missing a virtual host entry for port 443.
Listen 443
<VirtualHost *:443>
ServerName www.foo.com
DocumentRoot /var/www/www.foo.com/htdocs
CustomLog /var/log/apache/www.foo.com-access.log combined
ErrorLog /var/log/apache/www.foo.com-error.log
# Example SSL configuration
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "/var/www/www.foo.com/ssl/server.crt"
SSLCertificateKeyFile "/var/www/www.foo.com/ssl/server.key"
</VirtualHost>
Source: http://wiki.apache.org/httpd/ExampleVhosts
Here is the .htaccess code
# Use PHP 5.4
AddType application/x-httpd-php54 .php
# BEGIN s2Member GZIP exclusions
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]
RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1
RewriteRule .* - [E=no-gzip:1]
</IfModule>
# END s2Member GZIP exclusions
# BEGIN SSL
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ [https://]%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]
# END SSL
# BEGIN WordPress
RewriteEngine on
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^siteslogin$ https://example.com/wp-login.php [NC,L]
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
<FilesMatch "\.pdf$">
header set x-robots-tag: noindex
</FilesMatch>
# END WordPress
**And here is the wpconfig code**
# Use PHP 5.4
AddType application/x-httpd-php54 .php
# BEGIN s2Member GZIP exclusions
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]
RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1
RewriteRule .* - [E=no-gzip:1]
</IfModule>
# END s2Member GZIP exclusions
# BEGIN SSL
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ [https:]//%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]
# END SSL
# BEGIN WordPress
RewriteEngine on
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^siteslogin$ https://example.com/wp-login.php [NC,L]
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
<FilesMatch "\.pdf$">
header set x-robots-tag: noindex
</FilesMatch>
# END WordPress
本文标签: redirectDisplays url39s twice and getting 404 errors after activating
版权声明:本文标题:redirect - Displays url's twice and getting 404 errors after activating 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736304400a1932220.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论