![]() | ![]() | ![]() |
| |||||||
| Forums | Register | Groups | Awards | Arcade | Pets | T-Bucks / T-Store | Invite Your Friends | All Albums | Projects | Blogs | Mark Forums Read |
| Web Design Forums and discussions on webdesign |
Web Design | |||||||||
|
|
|
|
| |||||
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Civilians | Hello, Not sure if this is a good thing to do. The thought came from a thread from this ng a little while ago. Basically, it strips the 'www' from the entered url. <The_Code_I_Talk_Of> if (substr($_SERVER["HTTP_HOST"],0, 3) == 'www'){ header("Location: http://" . substr($_SERVER["HTTP_HOST"],4) . $_SERVER["REQUEST_URI"]); } </The_Code_I_Talk_Of> A reason to do this is the ensure that if someone was to place a link or bookmark to this particular site, then they would be more likely to 'copy/paste' the "http://example.com" instead of the "http://www.example.com". One reason for this, is that I would rather that the domain name "example.com" not compete with the subdomain "www.example.com" in search engines. Is this just silly to think that this is an issue anyway? Any thoughts please? Thanks -- mmmmm, jerky : http://www.choicebeefjerky.com.au dance with children in the rain |
|
| | #2 (permalink) |
| Civilians | > Writing in news:alt.www.webmaster > From the safety of the The Deep cafeteria > Disco Octopus <discooctopus@yahoo.com> said: > >> Hello, > > How do you do? > >> Not sure if this is a good thing to do. The thought came from a thread >> from this ng a little while ago. >> >> Basically, it strips the 'www' from the entered url. >> >> <The_Code_I_Talk_Of> >> if (substr($_SERVER["HTTP_HOST"],0, 3) == 'www'){ > > suggestion: change that to compare the 1st 4 chars to 'www.' > Yep. good point. ta. >> >> Any thoughts please? > > > As for the implementation - I'd rather see that done in the (web) server > configuration, but I guess you'd need shell/root access to set that. Well, I do have shell access, but I do not have admin access to the servers conf file..... however, I do have my .htaccess files that I can play with. Do you know what the syntax would be to effect this in ..htaccess? Thanks -- movies in WA : http://www.grandcinemas.com.au beef jerky - good to chew : http://www.choicebeefjerky.com.au eat beef jerky |
|
| | #3 (permalink) |
| Civilians | "Disco Octopus" <discooctopus@yahoo.com> wrote: > Well, I do have shell access, but I do not have admin access to the > servers conf file..... however, I do have my .htaccess files that I > can play with. Do you know what the syntax would be to effect this in > .htaccess? <http://johnbokma.com/mexit/2004/04/12/rewritingurlsforgoogle.html> -- John Perl SEO tools: http://johnbokma.com/perl/ Experienced (web) developer: http://castleamber.com/ Get a SEO report of your site for just 100 USD: http://johnbokma.com/websitedesign/seo-expert-help.html |
|
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 301 redirect question | -keevill- | Web Design | 1 | 08-20-2005 00:00 |
| 302 redirect question... | Viper | Web Design | 2 | 04-28-2005 20:00 |
| Question- best way to redirect? | J Antero | Web Design | 1 | 04-02-2005 20:00 |
| Redirect to an ftp server | ketil | Web Design | 1 | 11-02-2004 16:00 |
| html to php redirect? | Heidi | Web Design | 5 | 06-16-2004 15:29 |
![]() | ![]() | ![]() |