Click here to Skip to main content
15,920,633 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have create page and home page. After create page, it redirects to home page. But, it adds 80 in url and shows me ssl connection error

https://php-ankurreyes.c9users.io:80/laravel/public/

Can someone tell me whats the issue? Here's my accounttroller code and homecontroller code

PHP
<?php namespace App\Http\Controllers;
use App\User;



class HomeController extends Controller {
	
	public function home(){
		
		return \View::make('home');
		}




	/**
	 * Show the application dashboard to the user.
	 *
	 * @return Response
	 */


}



PHP
<?php
namespace App\Http\Controllers;
use Input;
use Illuminate\Support\Facades\Redirect;
use App\User;
use Hash;
class AccountController extends Controller {
    
    public function getCreate(){
        
     return \View::make('account.create');   
    }
    
    public function postCreate(){
        
        $validator= \Validator::make(input::all(),
        array(
            'email'=>'required|max:50|email|unique:users',
            'username'=>'required|max:20|min:3|unique:users',
            'password'=>'required|min:6',
            'password_again'=>'required|same:password'
            ));
            
            if($validator->fails()){
                
                return Redirect::route('account-create')
                       ->withErrors($validator)
                       ->withInput();
                
            }else{
                
                //create account
                
                $email = Input::get('email');
                $username = Input::get('username');
                $password = Input::get('password');
                //Activation code
                $code=str_random(60);
                
                $user = User::create(array(
                    'email'=>$email,
                    'username'=>$username,
                    'password'=>Hash::make($password),
                    'code'=>$code,
                    'active'=>0
                    ));
                    if($user){
                        return Redirect::route('home')
                        ->with('global',"sent email");
                        
                        
                    }
                    }
                
            }
        
        
    }
Posted
Comments
Sinisa Hajnal 14-Dec-15 3:47am    
Nothing wrong with your controller. Port 80 is default HTTP port. You should look for your problem elsewhere. Probably with SSL or your URL rewriting rules.
ankur1163 14-Dec-15 5:02am    
I posted this on cloud 9 editor form. They even gave me solution. But I dont know how to implement it. Ccan you please tell me? Here's the post url

https://community.c9.io/t/why-cloud-9-adds-port-80-to-my-url-after-redirect/475

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900