Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 10-22-2011, 08:22 AM
Junior Member
 
Join Date: 10-22-11
Posts: 2
iTrader: 0 / 0%
301 redirect issues - need .htaccess help please

Hi,

About 3 months ago I launched a new website and set up 301 redirects to redirect old pages to appropriate pages on the new site. All of my old pages are redirecting just fine, but am having issues with redirecting old home page(s) to new homepage.

Old site: www.eastsidechiro.net
New site: www.bellevuechiropractor.com

No matter what I do, the old site redirects to the wrong version of my new homepage.

eastsidechiro.net
eastsidechiro.net/index.html
www.eastsidechiro.net
www.eastsidechiro.net/index.html

All 4 above redirect to www.bellevuechiropractor.com/index.html as opposed to www.bellevuechiropractor.com

The old site has 7-8 years of history, links, citations, etc., and I would really prefer to have that page rank flow to the proper .com version of the new site. Any help with my .htaccess file would be greatly appreciated as I can't figure out what the issue is.

I'll state up front that I'm not a coder, and know just enough to be dangerous, although I do enjoy these problems to the extent that I learn a lot from them. But, I could sure use your expertise because I'm at my wits end.

Thanks in advance for your help!!!! .htaccess file from the old site below:
Code:
AddType x-mapp-php5 .php .html .htm Options +FollowSymLinks RewriteEngine On RewriteBase / # Forces a trailing slash to be added RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ RewriteRule (.*)$ /$1/ [R=301,L] RewriteCond %{HTTP_HOST} ^eastsidechiro.net [NC] RewriteRule ^(.*)$ http://www.bellevuechiropractor.com/ [L,R=301] RewriteCond %{HTTP_HOST} ^http://www.eastsidechiro.net [NC] RewriteRule ^(.*)$ http://www.bellevuechiropractor.com/ [L,R=301] RewriteCond %{HTTP_HOST} !^www\.eastsidechiro\.net [NC] RewriteRule ^(.*)$ http://www.bellevuechiropractor.com/$1 [L,R=301] Redirect 301 /index.html http://www.bellevuechiropractor.com/ Redirect 301 /about.html http://www.bellevuechiropractor.com/about.html Redirect 301 /fluoroscopy.html http://www.bellevuechiropractor.com/motion-xray.html Redirect 301 /treatment.html http://www.bellevuechiropractor.com/...pointment.html Redirect 301 /testimonials.html http://www.bellevuechiropractor.com/testimonials.html Redirect 301 /contact.html http://www.bellevuechiropractor.com/contact.html Redirect 301 /faq.html http://www.bellevuechiropractor.com/...treatment.html Redirect 301 /Headaches.html http://www.bellevuechiropractor.com/headaches.html

Last edited by HTMLBasicTutor; 10-22-2011 at 11:55 AM.
 
Reply With Quote
  #2 (permalink)  
Old 10-22-2011, 08:42 AM
ScriptMan's Avatar
Super Moderator
 
Join Date: 02-10-07
Location: Central Kentucky
Posts: 10,085
iTrader: 4 / 100%
Try adding a trailing / to the new domain name. That directs to the root of the site.

You may have to play with that rather messy list above as the file stops executing when the first match is found. What I mean by that is that if you have multiple redirects like
PHP Code:
#Decks and patios
RedirectMatch permanent /Decks_Patios/How-to-Build-a-Functional-Patio.php http://localhost/tom-test/11-How-to-Build-a-Functional-Patio.html
RedirectMatch permanent /Decks_Patios/Deck-Building-Materials.php http://localhost/tom-test/9-Deck-Building-Materials.html
RedirectMatch permanent /Decks_Patios/Guide-to-Patio-Materials.php http://localhost/tom-test/10-Guide-to-Patio-Materials.html
RedirectMatch permanent /Decks_Patios/A-Deck-Adds-Value.php http://localhost/tom-test/8-A-Deck-Adds-Value.html
RedirectMatch permanent /Decks_Patioshttp://localhost/tom-test/2/Decks_and_Patios-1.html 
You would need to list them in that order to ensure accurate results. The files must come before the directory only.



edit: it worked properly for me. Clear your cache and force a page reload.
__________________
SEO does not mean Spam Everywhere Online
Scriptman's Playhouse || Ramblings from an old man
2013 resolution: Don't feed trolls
ScriptMan
 
Reply With Quote
  #3 (permalink)  
Old 10-22-2011, 09:04 AM
Junior Member
 
Join Date: 10-22-11
Posts: 2
iTrader: 0 / 0%
Thanks so much for your help scriptman!!

There was a line of code in that .htaccess file that read:

Redirect 301 /index.html http://www.bellevuechiropractor.com/index.html

I removed it as I thought it was the problem but didn't change a thing.

EDIT: I removed the index.html on the end of that line

Apparently all I had to do was clear my cache and reload the page to see it was working!! Man, I need a drink... or a long nap.

Given that the redirects from teh old page are working well now, I'm assuming I should add a 301 in the .htaccess of the new site to redirect index.html to the .com? That is the only page that isn't resolving to the .com homepage?

Thanks again for your help. Sometimes I miss the most obvious things!

Last edited by taterchips; 10-22-2011 at 09:28 AM.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
htaccess Issues ourscompany Coding Forum 1 09-28-2011 08:30 AM
htaccess 301 redirect googleme7 Coding Forum 3 03-30-2011 02:36 AM
.htaccess redirect ezoteo Coding Forum 6 03-31-2010 04:25 AM
how to use htaccess for SSL redirect? jeremynet Coding Forum 1 12-06-2008 10:02 PM
.htaccess 301 redirect modine Coding Forum 14 06-12-2007 11:28 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 08:41 AM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.