Assistance with Apache rewrite (vhost or htaccess)
by socalheel from LinuxQuestions.org on (#5CD8R)
Hey.
I found out an issue with my WordPress installation. If I go to https://www.mywordpress.com/wp-admin (note there is no trailing slash), I get redirected to http://www.mywordpress.com/wp-admin/ (note it went from https to http and it now has a trailing slash). I need that trailing slash but I need it to go to https:// not http://
Here is what I have at the first section of my vhost conf file and it's not working and I don't know why. I need to capture the subdomain b/c this is a multisite WordPress installation. For example, www.mywordpress.com, site2.mywordpress.com, site3.mywordpress.com, etc.
Code:RewriteCond %{HTTP_HOST} ^(.+)\.mywordpress\.com\/wp\-admin$
RewriteRule ^/(.*)$ https://%1.mywordpress.com/wp-admin/ [R=301,L]Any input/advice would be great.
Thank you.


I found out an issue with my WordPress installation. If I go to https://www.mywordpress.com/wp-admin (note there is no trailing slash), I get redirected to http://www.mywordpress.com/wp-admin/ (note it went from https to http and it now has a trailing slash). I need that trailing slash but I need it to go to https:// not http://
Here is what I have at the first section of my vhost conf file and it's not working and I don't know why. I need to capture the subdomain b/c this is a multisite WordPress installation. For example, www.mywordpress.com, site2.mywordpress.com, site3.mywordpress.com, etc.
Code:RewriteCond %{HTTP_HOST} ^(.+)\.mywordpress\.com\/wp\-admin$
RewriteRule ^/(.*)$ https://%1.mywordpress.com/wp-admin/ [R=301,L]Any input/advice would be great.
Thank you.