Solved

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

Posted on 2014-10-03
14
237 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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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 500 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now