n0sleeves Posted May 25, 2013 Share Posted May 25, 2013 Reason I ask is because my client uses Yahoo Small Business for their host. Well, believe it or not, yahoo does NOT allow .htaccess files to be uploaded for whatever dumb reason!!!! Can you believe that!?I have the site completely done and integrated with PW.I would have never guessed that a host wouldn't allow .htaccess. Now I am stuck with an impatient client breathing down my back. What am I to do??!!! OMG The client is not willing to switch hosts. FML! Link to comment Share on other sites More sharing options...
diogo Posted May 25, 2013 Share Posted May 25, 2013 I'm sorry to tell you this, but I don't think you have any option here. PW requires the .htaccess or an equivalent alternative (some people are running PW on nginx) for securing some directories and for rewriting the urls. I guess you could secure the directories one by one in the control panel, but I don't see any alternative for the urls rewriting... I don't know that much about this, maybe you should wait for another answer. Link to comment Share on other sites More sharing options...
teppo Posted May 25, 2013 Share Posted May 25, 2013 "Yahoo! does not currently allow you to upload .htaccess files to your account. For other customization options, we recommend the Custom Error Pages and password-protection features available in your Web Hosting Control Panel." One trick is to use Apache error page as a redirect to index.php and then forcibly fill in GET variable "it" (which ProcessWire uses internally for it's URLs) from REQUEST_URI. Edit: just realized that even though this would make your public site viewable, Admin still wouldn't function at all, partly because a 404 header would always be sent (not to mention that this would probably stop Google bot from indexing your site etc.) Like @diogo already said, this is not doable. Not with a host with such limitations. That's what you should tell your client. If they want to stick with Yahoo! hosting, they're not going to get a proper CMS no matter what they do -- hosting is cheap, so it would make a lot of sense to get another host for the site, even if they (for some unimaginable reason) want to keep their Yahoo! deal.. Link to comment Share on other sites More sharing options...
horst Posted May 25, 2013 Share Posted May 25, 2013 ... I guess you could secure the directories one by one in the control panel, but I don't see any alternative for the urls rewriting ... Hhm, once I have written a PHP-alternative for apaches mod_rewrite, but unfortunately it needs a single entry in the .htaccess file to function And also if you could include it somehow into the processwire index.php without the need of the .htacess entry, I'm not sure if it is worth the work you have to do. Better you take the needed energy and talk to your client! ---- Technically you would have to buffer the complete output of every page, and with PW you first have to check if it is a page that has output for the browser!!. If it has, you have to loop through the output and rewrite all url-containing tags like href|src|action|area|...etc with prepending a new root-segment that points to a script that do the (emulated) mod_rewrite. I have written this class about nine yers ago, and of course, it was at the beginning time of my coder-carrier, so, it could be done much much better, but the basics are the same with todays PHP 5.2 and up. But once again, you would have to spent 1-2 days to get this achieved and tested!, - I think if your client want to save some money, he better should use another host, maybe in addition to the Yahoo! thing they have (maybe they have emails configured there and want avoid new setup for all that), only for the http-protocol (the website)! --- And, assuming that you don't have a part in your written contract that says something like that your work and the price for it is (only) valid for installation on standard-hosts that provide standard technics like Serverscripts (PHP) Servertechnics via .htaccess (mod_rewrite, protection, etc), from now on you should add it to every proposal / contract by default. (To be on a more secure side) Good Luck for you! and insight | intelligence | understanding for your client! Link to comment Share on other sites More sharing options...
Soma Posted May 25, 2013 Share Posted May 25, 2013 Maybe it would be possible to have the hosting point the dns to another server? Link to comment Share on other sites More sharing options...
teppo Posted May 25, 2013 Share Posted May 25, 2013 Maybe it would be possible to have the hosting point the dns to another server? ... and if that's not possible, there's always full page iframe (No, seriously, please don't do that -- it'll screw you in so many ways.) Somas idea is probably your best bet here. Even if moving whole domain is for some reason impossible, you could always point just www (or any other subdomain of your choice) somewhere else and redirect all web traffic there (example.com => 301 redirect to www.example.com.) In any case you'd still require another host for the site. Link to comment Share on other sites More sharing options...
Macrura Posted May 25, 2013 Share Posted May 25, 2013 @n0sleeves i ran into this problem about 2 years ago; you have to tell the client that they need a proper server that supports htaccess; and then do a dns entry to get the website domain to point to the site host.... most CMS won't work or at least are a huge headache to get working without the htaccess file... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now