Question
mod_rewrite : changing ip address to www.
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.
I’m forwarding my domain “thewebmadesimple.com” to http://178.62.21.147/thewebmadesimple.com - which is my droplet DO-07
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
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.
×
It sounds like you might be over-complicating this a little, but I do not know the whole picture, so just bear with me:
is there a reason you are “forwarding” your domain rather than just setting the top-level a-record to your droplet?
can you post your site config file? It should be in /etc/apache2/sites-enabled
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>