lundi 6 février 2017

How to redirect URL (Old to New) in php [laravel , htaccess]

Recently i changed my website corePHP to Laravel. So i have many old URls and i want to redirect them as new URLs .

my old URL- http://ift.tt/2lblLjq

i want to new url like this - http://ift.tt/2lgvSAb

I have code in route.php

       Route::get('{uri}', function($uri){
     $title = Input::get('title');

      if(preg_match('ad_posted.php?title=', $uri) && isset($title)){
        return Redirect::to('http://ift.tt/2lbkLvQ'.$title);
        }else{
           App::abort(404);
        }


  })->where('all', '.*');

But it did not work.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2lg4KRU
via IFTTT

Aucun commentaire:

Enregistrer un commentaire