Apache server configuration problem.


I want to have pages accessed by using a sub-directory format.

for example :

This page:


access via by: potatoes.simpg.net

So I wrote this in the htaccess:

RewriteCond %{HTTP_HOST} ^([^.]+).simpg.net [NC]
RewriteCond %{HTTP_HOST} !^www.simpg.net [NC]

RewriteRule ^.*$ http://simpg.net/disp_page.php?a=%1 [NC,QSA,L]

And I accessed the Apache server configuration file at:


and added an alias so the file reads:

SuexecUserGroup “#555” “#516
ServerName simpg.net
ServerAlias www.simpg.net
ServerAlias *.simpg.net
DocumentRoot /home/simpy/public_html
ErrorLog /home/simpy/logs/error_log

Then I restarted the Apache server.

I thought this would be enough to make it work how I want.

BUT I still get the error:

Firefox can’t find the server at potatoes.simpg.net.

What else do I need to do ?

Thanks for any help.


It sounds like you added a wildcard entry to Apache – but you’d also need some sort of wildcard DNS entry in order to make potatoes.simpg.net resolve to your server.

You can add DNS records in Server Configuration -> DNS Records.


Thanks for that suggestion.

I have now added the wild card record to the DNS

Do I need to wait for it to “propergate” or something ?

Cos I still get the error:

Firefox can’t find the server at potatoes.simpg.net.

This is screen shot of my DNS:


Is there something else do I need to do ?


Yeah your ISP’s DNS may have cached the previous response you got… as I’m able to perform a lookup on that domain. You may just need to wait a day or so for the cache to clear.


that page is actually working for me in the NL, too bad i dont like patatoes :slight_smile:

It took a few of hours but now the it works well EXCEPT if there is a period in the

This is what I have:

[code]RewriteCond %{HTTP_HOST} ^([^.]+).simpg.net [NC]
RewriteCond %{HTTP_HOST} !^www.simpg.net.net [NC]

RewriteRule ^.*$ http://simpg.net/disp_page.php?a=%1 [NC,QSA,L]

So this works fine with :


that goes to simpg.net/disp_page.php?a=potatoes

and the page displays - Great if you like Potatoes :slight_smile:

BUT if I have


And that just goes to the index page. :frowning:

It should go to : simpg.net/disp_page.php?a=recipes.potatoes

Which would work fine.

Do you know how I should adjust my htaccess above ?