Server error in localhost - mysql

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?q=$1 [QSA,L]
Error is like this:
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

Sounds like a standard python cgi error message. What exactly are you trying to do? What is the application you are trying to run? Please check the application's logs and so on.

Related

htaccess 404 loop - internal server error

I am a newbie here, made an htaccess with 301 redirect pages with extension (.html) to have no extension. The thing is that when entering into a wrong directory path the 404.html page doesn't work probably because a loop: It displays an error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster#pesto.com.uy to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
The htaccess file is as follow:
DirectoryIndex index.html
RewriteEngine On
RewriteRule ^index\.html$ / [R=301,L]
RewriteRule ^(.*)/index\.html$ /$1/ [R=301,L]
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} !rewrited
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ $1.html [NC,L]
ErrorDocument 404 /404
ErrorDocument 500 /404
Any ideas why this happens?
Warm regards guys

Laravel auth/login route not working in server but localhost

I am using laravel 5.4 default authentication system and it is working fine in localhost but when i upload my project to server, it is breaking. when i fill mail and password, it return back me 404 file not found error.
My site url is http://www.happycoder.me/imsRever2.0
You need to configure the .htaccess file as follows:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^imsRever2.0
RewriteRule ^(.*)$ imsRever2.0/$1 [L]
Otherwise, the main web server will not the routing, vs laravel causing the 404 error when the file isn't found.
My htaccess file is below what things i need to change
Options -MultiViews
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Laravel project deployment to live server from local development environment

I'm new to laravel. It's really good application. I developed web application using laravel docs. But the problem is how to deploy it on live server.
In local development environment we use "php artisan serve" command and can access project from http://localhost:8000.
But what should be proper way to run it on live domain. Please don't suggest me something like copy htaccess to root directory and rename server.php to index.php etc.
I will suggest you to watch video from Youtube videos : Move Laravel to Live
This video help you to install to server ; after installing you may even just ise composer or by copying files to server you can run your project in your live server.
Just be sure you installed laravel .
Of problem exists please let me know.
This .htaccess file will point to public/index.php file
DirectoryIndex public/index.php <IfModule mod_rewrite.c><IfModule mod_negotiation.c>Options -MultiViews</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ public/index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]</IfModule>

mod_rewrite setting with .htaccess for Slim Framework on OpenShift

I am trying to setup Slim Framework on OpenShift.
According to this link, I have to have an .htaccess file like below in the same directory of the index.php:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
However, things seems to work a bit different on OpenShift, I ended up with the following .htaccess for OpenShift by referring to this link:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
It sure looks fine for me, but when I try to access the end point, PHP just returned me a 404. The default welcome index.php generated by OpenShift works fine though.
Appreciate if anyone can point me out where my mistake was. Thank you.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]

After 5 to 5.1 SQL upgrade 500 internal server error

It's on a site that uses symlink - not sure if that's to blame.
I upgraded from SQL 5 to 5.1.
Several sites failed due to the htaccess saying php rather than php5 but that was simple to fix, one site is proving more difficult and I can't seem to find an answer.
The index.php page is actually static html so I'm thinking it must be the .htaccess at fault for this showing a 500 internal server error.
The .htaccess file looks like this:
Options -Indexes +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteRule ^(\.cache|images|cgi-bin|ads|css|vids|theme) - [L]
RewriteRule SteelExternalAll\.swf$ /theme/skin-SteelExternal.swf [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/[^/]+/(play-|index\.)
RewriteRule ^(games|videos|animations)/([^/]+)/? /$1/play-$2/ [NS,R=permanent,L]
ErrorDocument 404 /index.php