Forums / Installing on a Windows Server / Unnecessary IIS redirects

Unnecessary IIS redirects

Views: 2,677

Results 1 to 17 of 17
19 Dec 2011, 5:27 AM
#1
zcadqliv avatar

zcadqliv

New Zenner

Join Date:
Jan 2011
Posts:
69
Plugin Contributions:
0

Unnecessary IIS redirects

http://www.glimm_erdog.com

Put in the underscore above for safety.

I have a bunch {2000+} unnecessary redirects. I think it has something to do with either an .htaccsess file or a configure.php file.

The reason for thinking that is a lot of errors reference "cookie usage" and http -> https. I do have a SSL

I have a 301 redirect going from http://glimm.. to http://www.glimm.

Tried to figure it out, but could use some genius help. Thanks.

19 Dec 2011, 11:59 AM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Unnecessary IIS redirects

Although your SSL Cert is uses 'www.glim...' your Zen Cart 'includes/configure.php' for is not setup that way.

Check both your config files to make sure 'www' is used in your Domain name.

In your .htaccess file for the redirect it should look like this:

RewriteEngine ON

Note: you only need the 'RewriteEngine ON' to be stated once

it is mentioned here in case it is not already in your .htaccess file

adds www to Browser URL

RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*) http://www.yourdomain.com/$1 [R=301,L]

end adding www

Put the code at the top of your .htaccess file, for easy reference.

Also, always make sure to immediately test any changes to your .htaccess file. If something within it is incorrect your site will not be accessible. By verifying your work you can make sure things are working as you want and if they are not, quickly put things back the way they were.

The learning is in the doing.

Potent Products

19 Dec 2011, 7:40 PM
#3
zcadqliv avatar

zcadqliv

New Zenner

Join Date:
Jan 2011
Posts:
69
Plugin Contributions:
0

Re: Unnecessary IIS redirects

Thanks. I still have an issue but this did drop the unnecessary redirects by 1/3.

There are 6 instances of the address in the 2 configure.php files. All of them should be www.?

Also, I only need to edit the 1 .htaccess file?

Appreciate it!

19 Dec 2011, 8:40 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Unnecessary IIS redirects

zcadqliv:

I have a bunch {2000+} unnecessary redirects.
Who's telling you that you have 2000+ "unnecessary" redirects?
And what exactly constitutes "unnecessary" in your definition?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Dec 2011, 8:52 PM
#5
zcadqliv avatar

zcadqliv

New Zenner

Join Date:
Jan 2011
Posts:
69
Plugin Contributions:
0

Re: Unnecessary IIS redirects

I am using the MS IIS program and I believe another program flagged the same thing. I don't have my own definition of unnecessary. A lot of them list a link and a redirect to the "cookie usage" page and others have referenced http vs https.

19 Dec 2011, 9:30 PM
#6
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Unnecessary IIS redirects

zcadqliv:

Thanks. I still have an issue but this did drop the unnecessary redirects by 1/3.

There are 6 instances of the address in the 2 configure.php files. All of them should be www.?

Also, I only need to edit the 1 .htaccess file?

Appreciate it!

Yes, all 6 and Yes, the main .htaccess file

The learning is in the doing.

Potent Products

19 Dec 2011, 9:58 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Unnecessary IIS redirects

zcadqliv:

I am using the MS IIS program and I believe another program flagged the same thing. I don't have my own definition of unnecessary. A lot of them list a link and a redirect to the "cookie usage" page and others have referenced http vs https.
Who are these visitors? Are they legitimate customers? Or are they robots scraping your site?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Dec 2011, 10:17 PM
#8
zcadqliv avatar

zcadqliv

New Zenner

Join Date:
Jan 2011
Posts:
69
Plugin Contributions:
0

Re: Unnecessary IIS redirects

Thanks for the info Rob.

Doc -> I believe that the program works like a robot looking for errors. One separate error says the index.php has been referenced too many times and suggests a possible "infinite loop". My host had said to do a Wild Card redirect, but when I do I have trouble getting into the Admin. The site and SSL are working fine but I'm concerned about how the search engines could be handling this. I'm thinking my .htaccess is missing something to account for both the 301 move to www AND the https on the SSL. Maybe I don't know what I'm talking about, you guys know way more than I do.

I think my Admin/Config/Sessions is set ok.

Thanks.

19 Dec 2011, 10:25 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Unnecessary IIS redirects

What version of Zen Cart? What addons? What version of IIS?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Dec 2011, 10:40 PM
#10
zcadqliv avatar

zcadqliv

New Zenner

Join Date:
Jan 2011
Posts:
69
Plugin Contributions:
0

Re: Unnecessary IIS redirects

1.3.9h
I have Google Merchant Feeder and Multi Cross-sell.
The IIS is 7.0 Extensions I believe. Its for Windows 7 and I just downloaded that version a month ago.

19 Dec 2011, 10:47 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Unnecessary IIS redirects

There was a bug a long time back that would trigger some redirects and/or PHP errors when spiders or any other visitor that couldn't establish a session would visit the site. But that was fixed in or before v1.3.9a, so I don't expect it to be related here.

It seems this is a server configuration problem.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Dec 2011, 11:08 PM
#12
zcadqliv avatar

zcadqliv

New Zenner

Join Date:
Jan 2011
Posts:
69
Plugin Contributions:
0

Re: Unnecessary IIS redirects

Is wild card the correct choice? I remember seeing a fix a while ago for when your Admin locks out but I would need to find it again. Thanks.

20 Dec 2011, 12:47 AM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Unnecessary IIS redirects

If you've created your own redirects via .htaccess (or your IIS equivalent), and if you've got multiple rules that are conflicting with each other, then yes you might have a problem.

You probably don't need a 301 for changing to/from "www" in your URL if the canonical rules are working properly (which they should be if you're using v1.3.9h and haven't added any URL-rewrite addons). Esp if you've told the search engines already that you're making the change or told them to treat both as the same ... which most do anyway.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 Dec 2011, 10:21 PM
#14
zcadqliv avatar

zcadqliv

New Zenner

Join Date:
Jan 2011
Posts:
69
Plugin Contributions:
0

Re: Unnecessary IIS redirects

The link to "http://www.glimm_erdog.com/index.php?main_page=advanced_search_result" has resulted in HTTP redirection to "http://www.glimm_erdog.com/index.php?main_page=advanced_search".

The link to "http://www.glimm_erdog.com/index.php?main_page=redirect&action=banner&goto=5" has resulted in HTTP redirection to "http://www.glimm_erdog.com/index.php?main_page=cookie_usage".

Since I couldn't resolve this, I wanted to get specific info. Most of the errors resemble or are duplicates of above. I think if I resolve any it will resolve all or most. I must be missing something.

All "sessions" are standard default. There is an SSL.

Thanks.

29 Dec 2011, 2:02 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Unnecessary IIS redirects

zcadqliv:

The link to "http://www.glimm_erdog.com/index.php?main_page=advanced_search_result" has resulted in HTTP redirection to "http://www.glimm_erdog.com/index.php?main_page=advanced_search".That's normal when the visitor enters no search criteria, or if there are no results found.> zcadqliv:

The link to "http://www.glimm_erdog.com/index.php?main_page=redirect&action=banner&goto=5" has resulted in HTTP redirection to "http://www.glimm_erdog.com/index.php?main_page=cookie_usage".Banners usually do a redirect, especially if the banner links to an external page.
And in the case of linking to an internal page such as your banner#5 does, flagging up the cookie_usage page isn't surprising if the visitor is a search-engine spider or some other system that's not capable of cookies etc.

So, neither of those is worrisome IMO.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Dec 2011, 2:15 AM
#16
zcadqliv avatar

zcadqliv

New Zenner

Join Date:
Jan 2011
Posts:
69
Plugin Contributions:
0

Re: Unnecessary IIS redirects

Thanks DrByte -

I also got this:
http://www.glimm_erdog.com/" can also be accessed by using URL "http://www.glimm_erdog.com/index.php?main_page=index

Everything functions well, my real concern I guess is google counting as separate pages and diluting the relevancy.

Off topic, my only other issue is allegedly missing an H1 tag on the shopping cart page. Does this even make sense?

Thanks for all the help.

29 Dec 2011, 2:31 AM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Unnecessary IIS redirects

zcadqliv:

Thanks DrByte -

I also got this:
http://www.glimm_erdog.com/" can also be accessed by using URL "http://www.glimm_erdog.com/index.php?main_page=indexyes, that's normal. nothing wrong with that.
zcadqliv:

Everything functions well, my real concern I guess is google counting as separate pages and diluting the relevancy.If you're using v1.3.9 and haven't tampered with the core code that renders canonical URLs, then google won't be treating any of it as diluted.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.