Article 5CD8R Assistance with Apache rewrite (vhost or htaccess)

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.latest?d=yIl2AUoC8zA latest?i=hBYqnUgDyKU:T62nCZt0TXc:F7zBnMy latest?i=hBYqnUgDyKU:T62nCZt0TXc:V_sGLiP latest?d=qj6IDK7rITs latest?i=hBYqnUgDyKU:T62nCZt0TXc:gIN9vFwhBYqnUgDyKU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments