0

All of a sudden this morning I'm having a problem with accessing the home page to my site. I didn't make any changes so I'm not sure what the issue is. I'm guessing it has something to do with my .htaccess file.

All other pages to my site, I can access without a problem.

Below is my htaccess file. Any help would be appreciated. Thanks in advance.

Options -Indexes
Options +FollowSymLinks

RewriteEngine   on
RewriteRule ^hats-n-caps/(.*)$ http://www.domain-domain.com/apparel/hats-n-caps/$1 [R=301,L]
RewriteRule ^electronics/laser-pointers/(.*)$ http://www.domain-domain.com/desktop-office/laser-pointers/$1 [R=301,L]
#RewriteCond %{HTTP_HOST} !^www.domain-domain.com$ [NC]
#RewriteRule ^(.*)$ http://www.domain-domain.com/$1 [L,R=301]

RewriteCond %{REQUEST_URI}  (^(.*)/site-map)
RewriteRule ^site-map$ /inc/pages/site-map.php [L]
RewriteCond %{REQUEST_URI}  (^(.*)/site-map/products-([0-9]+))
RewriteRule ^site-map/products-([0-9]+)$ /inc/pages/site-map.php?type=product&page=$1 [L]
RewriteCond %{REQUEST_URI}  (^(.*)/site-map/catalogs-([0-9]+))
RewriteRule ^site-map/catalogs-([0-9]+)$ /inc/pages/site-map.php?type=catalog&page=$1 [L]
RewriteCond %{REQUEST_URI}  (^(.*)/site-map/pages-([0-9]+))
RewriteRule ^site-map/pages-([0-9]+)$ /inc/pages/site-map.php?type=pages&page=$1 [L]

RewriteCond %{REQUEST_URI}  (^(.*)-p-(.*).html*)
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}[L]
RewriteCond %{REQUEST_URI}  (^(.*)-c-(.*).html*)
RewriteRule ^(.*)-c-(.*).html$ product_info.php?catalog_id=$2&%{QUERY_STRING}[L]
RewriteCond %{REQUEST_URI}  !(^(.*)-c-(.*).html*|^(.*)-p-(.*).html*|^/index.php|^/sitemap.xml.*|^/info.php.*|^/google_base_feed.xml.*|^/BingSiteAuth.xml.*|^/test.html.*|^/test.*|^/ajaxplorer.*|/livechat.*|^/phpmyadmin.*|^/ControlPanel.*|^/actikare.*|^/amwater.*|^/phi.*|^/sas.*|^/blog.*|^/cfscg.*|^/chase.*|^/cleaver.*|^/clubz.*|^/medicone.*|^/net2ftp.*|^/college-net.*|^/ducks.*|^/fast-teks.*|^/gatesgroup.*|^/guesthouse.*|^/neighborcare.*|^/pdf.*|^/reedrill.*|^/survey.*|^/temp.*|^/templates.*|^/tidewater.*|^/tuthill.*|^/uploads.*|^/upload.*|^/_include.*|^/product_info.*|^/server_request.*|^/server_request_products.*|^/admin.*|^/img/.*|^/images/.*|^/spaw2?|^/static/.*|^/tmp/|^/_include/|^/robots.txt|^/LiveSearchSiteAuth.xml|^/favicon.ico|/SiteReturn/.*|^/inc/pages/site-map.php(.*)|^/carousel_products.php)
RewriteRule (.*)$   /index.php [L]
RewriteCond %{HTTP_HOST} ^domain-domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain-domain.com$
RewriteRule ^/?$ "\/" [R=301,L]


RewriteCond %{HTTP_HOST} ^domaindomain\.co$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domaindomain\.co$
RewriteRule ^/?$ "\/" [R=301,L]
Michal
  • 15,429
  • 10
  • 73
  • 104
Robert
  • 99
  • 1
  • 1
  • 3

1 Answers1

0

This line:

RewriteRule ^/?$ "\/" [R=301,L]

Is what's causing your redirect loop. Get rid of the entire rule:

# RewriteCond %{HTTP_HOST} ^domaindomain\.co$ [OR]
# RewriteCond %{HTTP_HOST} ^www\.domaindomain\.co$
# RewriteRule ^/?$ "\/" [R=301,L]

It essentially redirects requests to the root / to itself.

Jon Lin
  • 142,182
  • 29
  • 220
  • 220
  • @Robert Did you clear your browser's cache? A 301 redirect is permanent and the browser will always cache it. – Jon Lin Sep 16 '13 at 16:25
  • @Robert you have those rules twice, btw, did you remove both of them? – Jon Lin Sep 16 '13 at 16:45
  • Yes, I removed both. I have them twice because I own domaindomain.com and domain-domain.com, so they're not exactly the same. But i did try to remove them both. What's weird, is I did not make a single change to the site. This just started happening this morning out of nowhere. I'm pretty sure this may not be only an htacess issue. – Robert Sep 16 '13 at 16:52
  • It's resolved for now. Thanks for your help. I restored a previous version of my htaccess file from a year ago. I'll have to look to see what the dif is. – Robert Sep 16 '13 at 17:14