Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Redirect Works Too Well ?


  • Please log in to reply
2 replies to this topic

#1 ffredrik

ffredrik

    HR 1

  • Members
  • Pip
  • 1 posts

Posted 20 January 2010 - 01:28 AM

Hello,

I have a shop located in the /shop directory of my site. Visitors enter www.example.com
to reach the shop, so I have a .htaccess file like this:

CODE
redirect 301 /index.html http://www.example.com/shop/index.php


There is also a file www.example.com/index.html containing only the
Google analytics stuff.

I also have a blog located in www.example.com/blog, also with an index.html
that transfers to the actual blog site.

All this works as intented with one annoying exeption.

I can enter the blog directly via www.example.com/blog. The problem comes
when using the RSS feed for the blog. The blog post is displayed, but then transfers
immedeately to the web site's home page.

I have a strong feeling this problem is in .htaccess.

Any suggestions would be much appreciated.

#2 chrishirst

chrishirst

    A not so moderate moderator.

  • Moderator
  • 7,106 posts
  • Location:Blackpool UK

Posted 20 January 2010 - 02:59 AM

don't use .htaccess, simply put a PHP redirect on the index page.

BTW your GA code in the index.html isn't doing anything, because htaccess is read BEFORE a page is served.


#3 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 20 January 2010 - 10:26 AM

QUOTE
I can enter the blog directly via www.example.com/blog. The problem comes
when using the RSS feed for the blog. The blog post is displayed, but then transfers
immedeately to the web site's home page.

I have a strong feeling this problem is in .htaccess.


If the blog post actually displays at all before a redirect fires, it's not an .htaccess issue. As Chris mentioned above, .htaccess level things happen before there's every a page load, so if that was .htaccess you'd never see the post at all. Sounds like there may be some redirect happening in the rss feed or possibly something with a wrong url address entered. Typically you'd be looking either for a meta refresh instruction or some sort of Javascript redirect. Those are the ones that are usually used to provide a delayed redirect.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!