Problem with an added "www" ??
Not sure if this is a PHP problem.
I have set up a site which produces a webpage.
So an example page is:
The page is converted to :
by the .htaccess file.
This is the code:
"www" to the front of the url automatically.
So when they put "villarentfethiye.simpg.net" into the browser bar
it tries to find "www.villarentfethiye.simpg.net"
and then the system produces an error
saying it can not find the page because it is tryying to
which does not exist
I am not sure of the best way to deal with this.
Some thoughts ... ?
Not a thing to do with PHP or your htaccess.
If the browser is prepending www on front of a subdomain, than that is an issue with the user's browser. All you can do with it is remove the www from the provided input.
If you are using subdomains though, you should actually set them up. Your control panel should have an option to do so. If they are not real subdomains, I can see that being a bit flaky. You'll need to modify the DNS records to use wildcarded domains as well if they are not yet set.
Thanks for your reply.
a new set of pages. So there could be thousands of them.
I think that wordpress.com and blogger.com do the same thing and Google
suggested that Hubpages.com do it that way as wel when they complained
they had lost 50% of their traffic in the last update.
Maybe the above three do actually create real subdomains on their servers, but I
doubt it and I don't see the need when one line in the .htaccess file can deal with
the situation and get the data from the database table.
But do you think it could cause problems ?
I was thinking ...
I guess I can check to see if there is a "www." at the beginning of the GET data
and then strip it off before looking it up in the table ??
Thanks for any thoughts.
You would expect you need to set the wildcard domains. Otherwise, it will bind to site.com, and not to sub.site.com, so it won't actually route anywhere on the server. For these you'll need to contact someone proficient with DNS and webservers for the correct configurations.
I didn't think that www. was valid prepended to a subdomain, but I could be wrong. Assuming that its not valid, than the browser is to blame, and not the configurations (unless it can somehow interpret it differently based on the httpd host).
|All times are GMT +1. The time now is 04:21 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.