I have setup on a VPS a WordPress and DNS to redirect a domain name to my server. But I have trouble to hide the IP of the server. In fact when I am redirected from my domain name to the server, the URL changes from `www.example.com/wordpress` to `XXXXXX/wordpress` (`XXXXXX` is the IP address).

So I tried to change the Site URL in the settings for the domain name. However I got stuck in a loop between the server and the domain name or itself. In the settings I changed it to `http://www.example.com/wordpress` instead of `http://XXXXXX/wordpress`

Here is my configuration for the VirtualHost : `/etc/apache2/sites-available/default`

```
NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin admin@example.com
    ServerName  example
   ServerAlias example.com *.example.com
    DocumentRoot /var/www/
    ErrorLog /var/log/apache2/error.log
    CustomLog /var/log/apache2/access.log combined
<Directory /var/www/wordpress/>
    Order deny,allow
    Allow from all
    Satisfy any
</Directory>
</VirtualHost>

```

And here my `.htaccess` `/var/www/wordpress/.htaccess`

```
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

```

And in my log we can see that I have some internal redirections 

```
strip per-dir prefix: /var/www/wordpress/index.html -> index.html
applying pattern '^index\\.php$' to uri 'index.html'
strip per-dir prefix: /var/www/wordpress/index.html -> index.html
applying pattern '.' to uri 'index.html'
rewrite 'index.html' -> '/wordpress/index.php'
trying to replace prefix /var/www/wordpress/ with /wordpress/
internal redirect with /wordpress/index.php [INTERNAL REDIRECT]
strip per-dir prefix: /var/www/wordpress/index.cgi -> index.cgi
applying pattern '^index\\.php$' to uri 'index.cgi'
strip per-dir prefix: /var/www/wordpress/index.cgi -> index.cgi
applying pattern '.' to uri 'index.cgi'
rewrite 'index.cgi' -> '/wordpress/index.php'
trying to replace prefix /var/www/wordpress/ with /wordpress/
internal redirect with /wordpress/index.php [INTERNAL REDIRECT]
strip per-dir prefix: /var/www/wordpress/index.pl -> index.pl
applying pattern '^index\\.php$' to uri 'index.pl'
strip per-dir prefix: /var/www/wordpress/index.pl -> index.pl
applying pattern '.' to uri 'index.pl'
rewrite 'index.pl' -> '/wordpress/index.php'
trying to replace prefix /var/www/wordpress/ with /wordpress/
internal redirect with /wordpress/index.php [INTERNAL REDIRECT]

```

Any suggestions are welcome!