0

I created a Digital Ocean instance to install wordpress website 5 days ago. I already have my own domain, and created DNS Subdomain blog.mydomain.com. the server runs both nginx and apache so my apache port is 8082. Below is my actual wordpress URL looks like.

www.example.com:8082/wordpress/

Something which i have tried is below.

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com:8082/wordpress\
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ([a-z0-9-]+)/? http://$1.example.com [R=301,NC,L]

</IfModule>

Now my expected result is from

www.example.com:8082/wordpress\ 

to

blog.mydomain.com
New contributor
George Alvis is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

George Alvis is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.