Jump to content

Recommended Posts

Posted

Hi,

I have a case in which I've got a directory of php files that I don't really want to be managed by PW - they are just HTML snippet views being called by the only page in a single page web app.

The bottom line is that creating Templates and Pages for all of them seems like an unnecessary step, given that these files won't contain content that's managed by PW.

Is there a way to tell PW to just ignore the files in a particular directory, allowing them to be served as they would without PW?

An odd request, I know, but I think it makes the most sense for this particular use case.

Thanks for any help.

Posted

Pw already does that. Just put the files somewhere and htaccess will make sure Apache serves them instead of pw.

Posted

PW doesn't like you putting your own PHP files in or under /site/ or /wire/, as it's trying to protect those from being executed directly. But put them anywhere else and you should be fine.

  • 6 months later...
Posted

What might be the problem, if I only get 404 error when trying to access some php files outside PW? For example I have made info.php in the root with <?php phpinfo(); just to test and I get 404 page instead of the phpinfo-output. I have the default htaccess file in use.

This is happening only with php-files, not with html or jpg etc files.

Posted

That's unusual. Are you getting an Apache 404 or a ProcessWire 404? If the file actually exists and you are getting a 404, chances are that Apache can't read it (i.e. file is not readable) – double check the file permissions. 

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
  • Recently Browsing   0 members

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