Jump to content

custom page


davo
 Share

Recommended Posts

My server generates site usage stats in a directory called /stats

But when i navigate to this page, processwire takes over and complains the page is not found.

How do i get processwire to forget it's own page structure for a moment and just allow this directory through?

And, just out of interest, how is pw keeping control in the directory structure? Is it through htaccess file or something?

Cheers

db

Link to comment
Share on other sites

Are you sure that /stats/ is readable and that you are using it with a trailing slash, i.e. /stats/ not /stats ? ProcessWire should not take over unless Apache tells it to. There is a directive in our .htaccess that says "don't give control to ProcessWire unless the file or directory doesn't exist":

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 

As a result, you shouldn't have to do anything else. But perhaps there are some other factors, like another .htaccess file somewhere or permissions on the /stats/ directory not being quite right. You shouldn't have to do this, but you could always add this to your .htaccess file to specifically say "stop processing these rewrite rules if the URL is /stats/": 

RewriteCond %{REQUEST_URI} !^stats

You'd add that right above the other two mentioned above. 

Link to comment
Share on other sites

  • 1 month later...

thanks for the reply. Unfortunately that didn't solve it. It's an odd problem as all my other processwire sites on the same server work without problem. The stats directory is set to 755 and has a number of files in it for reading.

Link to comment
Share on other sites

Does your /stats/ directory have its own .htaccess file in it? Based on the name (stats=web stats?), I'm guessing it has an .htaccess file and that it is being used for http authentication? If so, it could be the ErrorDocument. Try adding this to the top of your .htaccess file in /stats/:

ErrorDocument 401 "Unauthorized"
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...