I have a PHP project up and running using AWS Elastic Beanstalk. I wanted to set a few things using .htaccess. Unfortunately I misspelled something, causing a configuration error of the Web site. After removing the .htaccess file again, the Web site was still not working. I tried redeploying the project, restarting the app server(s) and even rebuilding the entire Elastic Beanstalk environment without luck.
In the end, I created a new Elastic Beanstalk application, and then it worked fine. But now I've written something wrong in the .htaccess file again, the new application has stopped working, even though I have removed the erroneous .htaccess file.
What might be causing this issue? And how can I fix it?
Edit
I've checked the logs /var/log/httpd/access_log and /var/log/httpd/error_log, but they have not been updated since the Web site broke down.
The part of the .htaccess file that caused the issue turned out to be a permanent redirect (301) from http to https. But https was not yet set up on the server, and hence the request failed. Since it was a 301 redirect, my computer stored it and performed it on any subsequent request, regardless of the browser.
Related
I'm creating a website, and I wanted to upload a new version to the server. The problem is the .htaccess file.
I changed the file structure. Previously, I had an app folder with index.php in it, and .htaccess automatically removed the ending to make the url look like www.sitename.com/app.
Now app is app.php file, and same .htaccess removes .php to make the url look the same as before.
For users who have visited the site before, the redirection will not work, because it seems that the browser's cache is blocking them (after deleting everything works as it should). I'm still fairly new to web development, so is there any option to prevent this?
I am running a web application is AWS. I have a load balanced environment set up in Elastic Beanstalk and i have attached a certificate to that for HTTPS.
When i access the homepage URL, HTTPS works absolutely fine. The issue i have is when i add something to the URL such as /login then HTTPS just refuses to work and only HTTP will work.
It seems that it worked fine when it was using the sample application. However when i have uploaded my files to the environment it has the issue.
I am running a FuelPHP application. Does anyone know a fix for this, is it to do with my htaccess?
For anyone with a similar issue, it was Fuel PHP which was the issue. There is a setting under fuel/app/config/config.php to allow HTTP requests. Uncomment the following line:
'allow_x_headers' => true,
My site was working fine for the last couple of months and suddenly stopped working. and the issue was backend was working fine but the front end does not load at all.
then I contacted server providers they saying they have not done any changes to the server and asking me to contact Joomla support to see any in-depth errors. they even said they cant find any issues from the logs.
Then what I did was I reinstall VirtueMart (mind you this is an e-commerce site). then it started to work again from the front end. but I realize follow on pages aren't working. so what I did was I remove url re-writing and change the .htaccess code to txt.
so the issue I am having now is I can see index.php file in the URL. but whenever I try to change use url rewriting and enable .htaccess I get this error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster#domain.au and inform them of the time the error occurred, and anything you might have done that may have caused the error.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
anyone have any ideas?
Suddenly stopped working, without any change from your end ?
Try to step backward and recall anything you did before the issues.
The virtuemart re-installation should not have any relation with the SEF settings and the htaccess.
All these seem to be a combination of different issues.
Have you made any changes on the htaccess file ?
Go in Joomla Global configuration and disable SEF settings. Set URL rewriting to No. Then try to load pages in the front-end.
If you need SEF URLs, follow these instructions about how to enable this feature in Joomla:
http://docs.joomla.org/Enabling_Search_Engine_Friendly_(SEF)_URLs
I have been working with IIS 7 for a while and it has worked fine until it just suddenly started throwing 404 errors for my multiple websites even though they actually exist. All of the configurations seems fine (path, default document) but not a single file, no matter the format or location will be loaded.
Another strange thing is that everything works when I try to access the websites via localhost or 127.0.0.1 but not through my external IP.
Does anyone know why this could happen and how I can fix it?
Edit:
It appears this 404 page is not the built in IIS error page. It is associated with nginx but I'm not sure where the file is located on my server or why my pages are being intercepted.
It turns at the server was hijacked by Morfeus F***ing Scanner, which I was not aware was even a thing until this happened. It's activity showed up in the server access logs. I basically had to reset the entire server. It was quite a chore.
Basically i developed my app on a localhost wamp server with PHP 5. ON uploading to the actual host i notice that
The server is running php 4.4.9
Everytime i upload my .htaccess file, the server removes it completely.. seems to not be allowed
When i test out the set all i get is a 404 page not found
Any help on how to make it work on this PHP 4 server?
I did a test with CI 1.7.2, default installation.. works on my local server but when uploaded does not work, does this mean that the server does not support it?
I'm sure this isn't what you want to here, but get a new server. Here are the reasons why:
PHP 4 is no longer well supported. It's insecure.
If the server is removing .htaccess files, they are also unsupported on that server, giving you one more reason to move.
Code Igniter runs best with PHP 5 and with an .htaccess file.
The gist of this is you are going to have to hack your code back into the dark ages to get this to work, and then you will still have pretty URL issues and overall system instability. If you can make the switch, do.
If you cannot use .htaccess files with CodeIgniter, in system/application/config/config.php there is a configuration key called index_page. You need to set that to whatever page you have bootstrapping CodeIgniter (usually /index.php)
Then, make sure all your links that get routed through CI either target index.php/controller/action/params... or utilize the URL helper (with site_url or anchor) to automatically put in the index.php
Joe Mills is exactly right in his answer, though. CI works best with PHP 5 and .htaccess.
See CI URLs and CI URL Helper for documentation.
Well i found out how to fix several things
The issue with .htaccess would be to just not use modrewrite as such i put "query_string" option in my path variavable and this works.
The other issue, which was the major issue was that i was using Datamapper library which is a php 5 only library.