By Sungee Theme
My main WordPress is working good. http://sungeetheme.com
But its sub directory (WordPress) is not working.
It is redirecting to https.
I need to have working sub directory WordPress. http://sungeetheme.com/frexy_wp
But it is redirecting to https://sungeetheme.com/frexy_wp and not working. http://prntscr.com/lb0b1f
Please help this.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, @sungeeservice
Could you please let me know if you’re using Nginx or Apache? In Apache you need to set Allow Override to All under the secure virtual host at port 443.
The following code in the htaccess file allows to force https across the whole website except a specific folder:
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !/webservice [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
So any request to http would go to https. However you still need to explicitly change requests to https on your specified folder to redirect to http, so added the following code after the above:
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} /webservice [NC]
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Hope this helps
Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.