|
I have a webfaction Static/CGI/PHP-5.3 site that was migrated from a different host's Apache. It had a rewrite rule:
That Nginx is not seeing. How can I get this working so a url like example.com/foo fetches foo.html from disk? This old forum post does not seem encouraging: http://forum.webfaction.com/viewtopic.php?id=3931 The Nginx magic presumably I can look up, but how to get it working on webfaction is more murky. |
|
On WebFaction under a Looking at this rule, you may need a " As for Nginx rewrite rules, if you are actually running your website under an Nginx instance (for example, if you're using Django with uWSGI under Nginx), then you should be able to use them exactly as described in the Nginx documentation. The Apache code above ran perfectly for many years. The webfaction control panel shows the site as Static/CGI/PHP on /. But when I use "wget -S" I see "200 OK Server: nginx". And .htaccess files don't work. So is it Nginx or Apache serving this stuff? If this is indeed Nginx how do I insert configuration into it? This is because everything is hosted behind an nginx proxy, it is really apache which is hosting the PHP. This image will illustrate. No .htaccess directives are working, not even a simple: RedirectMatch 404 ^robots.txt Though I swear they worked at one point. If you're moving the site from another host to WebFaction, sometimes differences in the apache configuration can mean that rewrite rules and other directives have to be tweaked. However, do you mean that this used to work on WebFaction and no longer does? We haven't made any significant changes to Apache which should have broken these rules. If you are indeed moving the site from another webhost to WebFaction, please open a support ticket so we can take a look at the actual site. I can certainly guarantee that our servers support |
|
Based on the context of this issue, the rule needed to be:
In case anyone encounters this problem in the future, this is related to the way that the Hope that helps! |
|
One thing I've noticed is that Webfaction servers require RewriteBase / |