为什么端口80已添加到我的网址 [英] why does port 80 has been added to my url
本文介绍了为什么端口80已添加到我的网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了页面和主页。创建页面后,它会重定向到主页。但是,它在网址中添加了80并显示我的ssl连接错误
https://php-ankurreyes.c9users.io:80/laravel/public/
有人能告诉我这是什么问题吗?这是我的帐户代码和家庭控制器代码
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 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
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");
}
}
}
}
推荐答案
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= \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-> failed()){
return 重定向:: route(' account-create')
- > withErrors (
validator->fails()){ return Redirect::route('account-create') ->withErrors(
验证器)
- > withInput();
}其他{
// 创建帐户
validator) ->withInput(); }else{ //create account
这篇关于为什么端口80已添加到我的网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文