Hi,
I want to have pages accessed by using a sub-directory format.
for example :
This page:
http://www.simpg.net/disp_page.php?a=potatoes
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:
etc/httpd/conf/httpd.conf
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.
Howdy,
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.
-Eric
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:
http://www.sd5.info/simpg01.jpg
Is there something else do I need to do ?
Thanks.
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.
-Eric
that page is actually working for me in the NL, too bad i dont like patatoes :)
Yes, It took a few of hours but now the it works well EXCEPT if there is a period in the string.
This is what I have:
So this works fine with :
potatoes.simpg.net
that goes to simpg.net/disp_page.php?a=potatoes
and the page displays - Great if you like Potatoes :)
BUT if I have
http://recipes.potatoes.simpg.net/
And that just goes to the index page. :(
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 ?
Thanks.