0

I would like to type /blog in my url and have it go to my locally hosted WordPress page at http://localhost/wordpress

I modified my host file to redirect blog to the localhost. Now apache display the 'It works!' page. But I need it to redirect to http://localhost/wordpress

What is the best way to do this?

Brig
  • 101
  • 3

1 Answers1

2

While simply changing the documentroot for your website to the wordpress directory would do the trick, it wouldnt redirect to /wordpress like you want.

I'd suggest using a rewrite rule for this in the apache config.

RedirectMatch ^/$ wordpress/

pablo
  • 3,040
  • 1
  • 19
  • 23