|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
301 redirecting
Ok. I'm FINALLY getting around to 301 redirecting some pages on my site.
I need to redirect my non-www. to my www. URL. AND I need to redirect my home.html to my index.html The only problem is, I have never done it and the reading I am doing on it, I am still not sure. This is what I have found to do on redirecting the home page to the index page: HTTP/1.1 301 Moved Permanently Location: http://www.example.org/ Content-Type: text/html Content-Length: 174 <html> <head> <title>Moved</title> </head> <body> <h1>Moved</h1> <p>This page has moved to <a href="http://www.example.org/">http://www.example.org/</a>.</p> </body> </html> Is this correct or do you know another way? Also, would I put this code in the home.html page? Any help would be greatly appreciated. Also, How would I redirect the non-www to the www? Thanks so much! |
|
#2
|
|||
|
|||
|
anyone have any idea?
|
|
#3
|
||||
|
||||
|
Does this helps you out
http://www.webconfs.com/how-to-redirect-a-webpage.php Are you on a windows or linux server?
__________________
Link Diary - Build Links Fast & Easy. Similar to Linkmarket, with option of three way link exchange and anchor rotation. **"Save SEO Industry - GO VIRAL!! - Tips and Tricks ."** **"If you surrender to the wind, you can ride it."** **" |
|
#4
|
|||
|
|||
|
For 301 Moved Permanently
********************* <Files ~ "^.(htaccess|htpasswd)$"> deny from all </Files> RewriteEngine on RewriteCond %{HTTP_HOST} ^(example\.org)(:80)? [NC] RewriteRule ^(.*) http://www.example.org/$1 [R=301,L] Redirect permanent example.org www.example.org order deny,allow ****************** For non www to www ****************** <Files ~ "^.(htaccess|htpasswd)$"> deny from all </Files> RewriteEngine on RewriteCond %{HTTP_HOST} ^(example\.org)(:80)? [NC] RewriteRule ^(.*) http://www.example.org/$1 [R=301,L] Redirect permanent example.org www.example.org order deny,allow ****************** Hope it will helps you if Apache Web server used. |
|
#5
|
|||
|
|||
|
Quote:
Linux Server I believe. I am not so sure how to find out. |
|
#6
|
|||
|
|||
|
Quote:
No I think I am using a linux host. I am using godaddy though. Do you know how to find this out also? |
|
#7
|
||||
|
||||
|
find out by doing a whois search on your domaion here http://whois.domaintools.com
|
|
#8
|
|||
|
|||
|
Quote:
it just said that my server is whois.godaddy.com |
|
#9
|
||||
|
||||
|
Try this tool
http://uptime.netcraft.com/ also it should say in your hosting account, the file structure will give it away as well. |
|
#10
|
|||
|
|||
|
Quote:
Ok, It's a Linux server. Now what? lol |
|
#11
|
|||
|
|||
|
Quote:
Any Takers? |
|
#12
|
|||
|
|||
|
Quote:
To redirect from the non-www version to the www version Write the following code in your .htaccess file: Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.org
RewriteRule (.*) http://www.example.org/$1 [R=301,L]
|
|
#13
|
||||
|
||||
|
if htaccess does not exist already make a blank file, put the code in that prof stan showed you and save it at the root of your webserver.
|
|
#14
|
|||
|
|||
|
Quote:
Thanks a lot Prof. Stan and Googler BIG HELP!! now is there a magic formula to redirect my home page to my index.html page? |
|
#15
|
|||
|