Technical help with htaccess please

Discuss webmaster issues, website development and resources. Ask questions about website building, coding, SEP/SEO etc here. NO ADS!

Moderators: magnetize, Oosha, ftello, shezz

Technical help with htaccess please

Postby lissie » Wed Oct 07, 2009 4:07 am

Help oh technical Gods. I have a MSB site which is showing Adsense fine on every page EXCEPT the non-www version of the front page (the www version is fine too)

I checked and google hasn't indexed the non www version on the top level either (everything else is indexed)

I think the problem is in the htaccess - the relevant part of it is :
Code: Select all
ErrorDocument 404 /archive.php
Options +FollowSymLinks -MultiViews

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^www.NICHEDOMAIN.com [NC]
RewriteRule ^.*$ http://NICHEDOMAIN.com%{REQUEST_URI} [R=301,L]
Redirect 301 /tag/MY-NICHE http://NICHEDOMAIN.com/


Any ideas? Or have jumped to the wrong conclusion? It was a preowned that probably had the www indexed initially which is might be what is confusing G
Lis
Passive Income and Controversy!
lissie
 
Posts: 511
Joined: Tue Jun 17, 2008 3:22 am
Location: New Zealand

Re: Technical help with htaccess please

Postby indoorouthouse » Thu Oct 08, 2009 8:33 am

rrrg i hate those htaccess files - always have to look up the mod_rewrite manual....
am i reading the htaccess correctly that it is trying to redirect all www to non www version of the page?
is that what you actually want?
and don't you need a $ like so(bolded): RewriteCond %{HTTP_HOST} ^www.NICHEDOMAIN.com$ [NC]
to end the pattern?

erm...you could always just rip the lines out and see what happens :)
indoorouthouse
 
Posts: 22
Joined: Thu May 08, 2008 7:24 am

Re: Technical help with htaccess please

Postby lissie » Thu Oct 08, 2009 8:48 am

weird - I did nothing now the ads are fine and the non www. version of the top level is indexed - *shrug* interweb on the blink!
Lis
Passive Income and Controversy!
lissie
 
Posts: 511
Joined: Tue Jun 17, 2008 3:22 am
Location: New Zealand


Return to Web Development Resources

Who is online

Users browsing this forum: No registered users and 1 guest

cron