|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello,
Can someone remind me how you make "mysite.com", "www.mysite.com, and http://mysite.com all point to "http://www.mysite.com"? I just want to make all forms of the URL point to the one main URL but can't recall where to do it or how to do it. I do have this in the .htaccess file but I am not sure if it is it RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.usernomics\.com$ RewriteRule (.*) http://www.usernomics.com/$1 [R=301,L] Thanks, Bob |
|
|||
|
Mine's a little different. I'm certainly no coding expert, but it works:
RewriteEngine on Options +FollowSymlinks RewriteBase / RewriteCond %{HTTP_HOST} !^www\.domainname\.com RewriteRule ^(.*) http://www.domainname.com/$1 [L,R=301] |
|
|||
|
Thanks Bob,
I think the one I have is doing the job pretty well. However, I now have added a sub domain of "jobs.usernomics.com" that also works with Usability & User Interface Design - Job Listings but it does not work with http://www.jobs.usernomics.com or with www.jobs.usernomics.com. So I would like to point the latter two to one that works such as "jobs.usernomics.com". Would another script in my htaccess file do that? If so, do you know what the script would look like? Thanks Again, Bob |
|
|||
|
The following seems to work OK:
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Code:
http://www.jobs.usernomics.com You can't use the www when there is a subdomain name like jobs in front of your domain name. |
|
|||
|
Oh my. I missed the whole point. That's why http:/www and www. do not work.
Thanks for pointing that out. Much appreciated. Bob |
|
||||
|
Hi ergobob,
This might seem to easy but ask your ISP to give you the option to have www or , mysite. This is a hosting issue as www.mysite.com is the same as mysite.com if allowed by your host Regards Keimos
__________________
Keimos - Always learning something new each day www.keimos.co.uk , www.keimos.net , www.selfpacedit.co.uk |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 301 or 302 redirect? | stephanjaeger | Search Engine Optimization Forum | 9 | 02-28-2007 09:03 AM |
| Redirect url | bronks | Search Engine Optimization Forum | 4 | 06-10-2006 12:18 AM |
| 301 redirect | schmeetz | Web Programming Discussion Forum | 11 | 08-10-2005 02:54 PM |
| 301 redirect | magnolia1 | Google Discussion Forum | 8 | 01-17-2005 07:57 PM |
| To redirect or not to redirect | LoveNotWar | Search Engine Optimization Forum | 1 | 08-22-2004 08:20 AM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |