Go Back   Trackpads Community > General Discussions > Computer and Technology > Web Design

Web Design Forums and discussions on webdesign

Web Design

Reply
 
LinkBack Thread Tools
Old 08-22-2005, 20:00   #1 (permalink)
Disco Octopus
Civilians

 
Default redirect? opinions please

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


 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Trackpads Information
Click to Visit
Old 08-22-2005, 20:00   #2 (permalink)
Disco Octopus
Civilians

 
Default Re: redirect? opinions please

> 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


 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-22-2005, 20:00   #3 (permalink)
John Bokma
Civilians

 
Default Re: redirect? opinions please

"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
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


Community Information
Options
Quick Options
Trackpads Non-Commercial Ad
Copyright Information Click to Visit
Time
Server Time
All times are GMT -4. The time now is 00:56.
Copyright
Copyright Information
The header is based off of work by Vipixel.com and modified by this site. Trackpads and the Trackpads Logo are both Registered Trademarks of Jason Edwards and cannot be used without prior written permission.  The only exception is as a link back to this site. Trackpads is a private website run by a small legion of volunteers, 3 dogs, 12.5 cats and an army of small, super smart, bio-engineered mice with pointy hats and tutu's. Search Engine Friendly URLs by vBSEO 3.2.0 RC7
Archive Links
Archive Links
Page generated in 0.86137 seconds with 19 queries