Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Website with URL rewriting not loading each time, inconsistent across different browsers

Posted on 2014-10-03
14
Medium Priority
?
256 Views
Last Modified: 2014-10-03
This is a test URL for a new website:
http://feeneygurwitz.bbdesign.com/espanol-sex-offenses

I am having very mixed results with loading it. The local copy on my computer works fine, but when loading from the internet sometimes the page will load, sometimes I will get "page not found". Then I hit "reload" and it loads again.

In Safari, sometimes it loads, but then the CSS file doesn't load so the styles are missing. Odd behavior in Chrome as well.

I'm hoping someone can load this URL in a browser or two and see if you are getting similar results. I have used this exact same test procedure on other sites but never had this happen before, so not sure what's going on.

I don't know if the .htaccess or IIRF (which is what I'm using on the Windows side) has to do with it, or perhaps even my "canonical" tag. But as I said, I have used these before in the same way, never a problem.

Thanks!
0
Comment
Question by:bbdesign
  • 8
  • 6
14 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40359632
If you are using IIRF then the question is why are you using it.
I get the same thing as you - hard to debug our side as we cannot see the internal workings of what you are doing.
0
 

Author Comment

by:bbdesign
ID: 40359673
I'm using it to do the URL rewriting, it is very similar to using .htaccess for rewriting.

Here is the other site I have setup the exact same way:
http://beta.stoneridgeretirement.com/

Yet, I have none of the problems. I'm not sure what is different from one site to the other, why I have problems with one, but not the other, etc.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40359695
But that site is not a sub domain of your site, so there very well could be lots of differences in the setup.
It seems to point to a redirect problem, though I'm still at a loss as to what you are are redirecting and to where.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:bbdesign
ID: 40359707
This is my iirf.ini file contents:

RewriteEngine On

RewriteRule ^/?$ /default.htm [NC,L]
RewriteRule ^/?([^\.]+)$ /$1.htm [NC,L]

Open in new window


It just rewrites a folder name to the folder name + ".htm".

So this:
http://feeneygurwitz.bbdesign.com/espanol-sex-offenses
...turns into this:
http://feeneygurwitz.bbdesign.com/espanol-sex-offenses.htm

The 2nd URL doesn't seem to have the same problems as the first, though, so I guess that points to IIRF as being the issue.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40359740
I don't know the program but seems to follow the same rules as .htaccess where I would use

RewriteRule (.+)/$ /$1.htm [NC,L]
0
 

Author Comment

by:bbdesign
ID: 40359760
I tried that, but now the page won't load at all. I think the original syntax was OK.

Yes, this site is a subdomain, but so is beta.stoneridgeretirement.com, so I don't understand why there would be any difference. Their iirf.ini files are identical.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40359777
Try

RewriteRule ^([^\.]+)$ $1.htm [NC,L]
0
 

Author Comment

by:bbdesign
ID: 40359801
Done. That seems to work as well as what I had originally, but also has the same problems. I don't think its a regex problem.

My testing with Firefox seems to be as follows:

1. Load the URL, it gives "the page cannot be found".
2. Do a hard refresh, page loads OK.
3. Do a regular refresh, "the page cannot be found" again.
4. Hard refresh, page loads OK again.

Safari:

1. Load the URL, the page loads but the CSS is missing along with most of the graphics.
2. Repeatedly do a hard refresh, once in a while the page loads OK.
3. Most subsequent page reloads, back to the same thing as #1.

Chrome:

1. Almost always loads "page cannot be found".

You may question why I'm doing this, but I really want a solid workflow that I can duplicate for a lot of future work, so that's why I would love to figure this out. I don't think I've ever seen a site behave like this before.

Thanks.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40359810
Then I would move my thoughts towards the server setup for the sub domain - off the top of my head I cannot think what as I don't really deal with IIS.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40359820
Brainwave! It could be adding .htm to all files including css and js

Try this
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.htm [NC,L]
0
 
LVL 58

Expert Comment

by:Gary
ID: 40359979
A curious thing after a certain amount of time refreshing in Chrome the page loads normally which lead me to think this may be something to do with sessions.
Just testing now how long it is before the page successfully loads between refreshes
0
 

Author Comment

by:bbdesign
ID: 40360057
Not sure if that helped or not, but it does make sense. Still, it isn't a problem on the other site at all. Here is my entire INI file now:

RewriteLog D:\feeneygurwitz.com\iirf\iirf

RewriteLogLevel 3

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/livemerchant /livemerchant/index.asp
RewriteRule ^/?$ /default.htm [NC,L]
RewriteRule ^/?([^\.]+)$ /$1.htm [NC,L]

Open in new window


There is some information in this article, just FYI:
http://jkshay.com/implementing-an-isapi-rewrite-for-iis-6/

There is also a log file, which now generates some details, not sure if that will be helpful. I was wondering if this also could have anything to do with the number/levels of slashes in the generated URLs.

The browsers are definitely behaving odd, I don't see why one page load should be any different from another. I'm not using any session data in this site, its all static HTML.
iirf.3680.log
0
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 40360076
The log says nothing except the correct url's are being rewritten.

This is interesting, someone had the same problem, enabled IIS logging and it fixed it...
http://iirf.codeplex.com/discussions/213921
0
 

Author Comment

by:bbdesign
ID: 40360135
WOW. That fixed it. I was thinking "what could possibly be the difference between site 1 and site 2 with IIS settings". And you are right, the only thing I can think of is logging, which was turned off in site 2. But I didn't think of that until you mentioned it jsut now. Why on earth that would cause this... no idea. Thanks Microsoft!
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
No other job is as rewarding and demanding as building an iPhone app is. It is not really in the hands of the developer for the success of an iPhone app. Many factors operate jointly for every iOS application's success in the market.
This video teaches users how to migrate an existing Wordpress website to a new domain.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month10 days, 9 hours left to enroll

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question