Question

mod_rewrite : changing ip address to www.

  • Posted on February 27, 2015
  • gileshtAsked by gilesht

Hi, so I’ve read through your documentation and also through posts and I’m still unclear of the problem. Can I get your help please. Goes like this.

  1. I’m forwarding my domain “thewebmadesimple.com” to http://178.62.21.147/thewebmadesimple.com - which is my droplet DO-07

  2. I’ve set up mod_rewrite to /var/www/thewebmadesimple.com but I cant find out how to substitute the 178.62.21.147 to www (I want to end up with www.thewebmadesimple.com)

sorry if this is a stupid question (guess I’m stupid). thanks in advance

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Sierracircle - thanks for your help on this.

I had to go round the houses a few times, learnt loads, turns out that I was forwarding my domain incorrectly. Once I’d covered that it all fell into place.

thanks for your time - appreciate it

Hi, thanks for taking the interest… looks like this

<virtualHost *:80> ServerAdmin webmaster@localhost ServerName thewebmadesimple.com ServerAlias www.thewebmadesimple.com DocumentRoot /var/www/thewebmadesimple.com

<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow, deny allow from all </Directory> </VirtualHost>