hzuluaga

Experience

13,590

0 Best Reply Awards

  • Member Since 4 Years Ago
  • 290 Lessons Completed
  • 14 Favorites

18th January, 2018

hzuluaga left a reply on HTTPS : Error When Forcing Https Via .htaccess , Or ForceScheme Or Middleware • 6 months ago

I found the reason of the error ..I had to add some directives inside the virtualhost port 443

<VirtualHost *:443> <Directory "/var/www/html/siterootdir"> Options FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all

13th January, 2018

hzuluaga left a reply on Https: Not Working In Laravel • 6 months ago

Hello @rider

Have you solved your problem? I have the same one..!

hzuluaga left a reply on Https Routes Not Working • 6 months ago

Sorry , @arabsight have u solved this problem? I have the same

hzuluaga left a reply on Https Routes Not Working • 6 months ago

madala Hello , have you solved your problem? I have the same one...

hzuluaga started a new conversation Error When Forcing HTTPS Via .htaccess , Or ForceScheme Or Middleware • 6 months ago

Hello I have installed ssl certificate on Apache /CentOs6 and it works. I modified .htaccess file within my laravel/public folder in order to force https requests. however , apart form the login page that is displayed correctly (with the https url) , after authentication is done, the server responds with the following error: Not Found The requested URL /login was not found on this server. Apache/2.2.15 (CentOS) Server at elinforme.jepcolombia.org Port 443

this is my .htaccess: Options -MultiViews -Indexes

RewriteEngine On

Handle Authorization Header

RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Redirect Trailing Slashes If Not A Folder...

RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301]

force HTTPS

RewriteCond %{HTTPS} =off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Handle Front Controller...

RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L]

Same happens if I force https via \URL::forceScheme('https') . called in AppServiceProvider.php or using middleware :

namespace App\Http\Middleware;

use Closure;

class HttpsProtocol { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) {

    if (!$request->secure()) {

            return redirect()->secure($request->getRequestUri());

    }

    return $next($request);
}

}

What am I missing ? thx any help ...

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.