Greenguy's Board


Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2010-02-23, 10:37 AM   #1
Dr Bizzaro
I'm not interested in the facts, I'm interested in my opinion.
 
Dr Bizzaro's Avatar
 
Join Date: Apr 2003
Location: Chicago
Posts: 1,620
Send a message via ICQ to Dr Bizzaro
.htaccess problem

I just bought a site and I was looking through the stats and see that a lot of traffic is being sent to:

http://www.domain.com/index.php/feed/

My normal htaccess file does not work because it's going to index.php/feed/ and not just /feed/

Not sure what I can add to my htaccess to get that to redirect back to the main page.


Here is what I currently have:

Quote:
AddHandler server-parsed .html
AddType text/html html


RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.domainname.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://domainname.com*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://domainname.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domainname.com*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://domainname.com:80/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domainname.com:80/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://domainname.com:80.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domainname.com:80.*$ [NC]

RewriteRule (gif|jpg|png|swf|mpg|avi|GIF|JPG|PNG|SWF|MPG|AVI)$ http://www.domainname.com [R,L]

ErrorDocument 400 http://www.domainname.com
ErrorDocument 403 http://www.domainname.com
ErrorDocument 404 http://www.domainname.com
ErrorDocument 501 http://www.domainname.com
ErrorDocument 502 http://www.domainname.com
ErrorDocument 503 http://www.domainname.com
Dr Bizzaro is offline   Reply With Quote
Old 2010-02-23, 11:30 AM   #2
Dr Bizzaro
I'm not interested in the facts, I'm interested in my opinion.
 
Dr Bizzaro's Avatar
 
Join Date: Apr 2003
Location: Chicago
Posts: 1,620
Send a message via ICQ to Dr Bizzaro
Keeping in mind that I used "domain.com" in place of the actual domain.
I don't actually own domain.com

Dr Bizzaro is offline   Reply With Quote
Old 2010-02-23, 01:25 PM   #3
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Code:
RewriteEngine on
Rewriterule index.php/feed/ http://www.domain.com/ [R=301,L]
not sure exactly where you want it to head, but, http://www.domain.com/ will redirect it to the root of the domain with the www. preceding.

you might consider replacing:

Code:
RewriteRule (gif|jpg|png|swf|mpg|avi|GIF|JPG|PNG|SWF|MPG|AVI)$ http://www.domainname.com [R,L]
with

Code:
RewriteRule (gif|jpg|png|swf|mpg|avi|GIF|JPG|PNG|SWF|MPG|AVI)$ http://www.domainname.com/ [R=301,L]
Since your other rewrite will do a 302 and you might be unintentionally scraping your results. Without the trailing / on the url, you would also force the surfer (or spider) to have to do a 301 redirect to properly grab the file at the root.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2010-02-23, 01:46 PM   #4
Dr Bizzaro
I'm not interested in the facts, I'm interested in my opinion.
 
Dr Bizzaro's Avatar
 
Join Date: Apr 2003
Location: Chicago
Posts: 1,620
Send a message via ICQ to Dr Bizzaro
Awesome. Works perfect.
Thanks!
Dr Bizzaro is offline   Reply With Quote
Reply


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

Forum Jump


All times are GMT -4. The time now is 10:05 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc