Tuesday, September 18, 2018

.htaccess - rewrite url to subdomain and include full url

i'm trying to prepend all of my urls from mysite.com/sub to sub.mysite.com and retain the full url using mod_rewrite ad it doesn't seem to be working.




example



if someone goes to - mysite.com/sub/1/2/3, the url in the address bar should be sub.mysite.com/1/2/3



i moved a wordpress install to my root that was previously installed to a subdirectory with a subdomain pointing to it and want to retain my url structure for posts.



thanks!

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...