jeudi 25 avril 2019

Using '?' in route for old URLs

We have a bunch of URLs like this /order/step1.php?service=999 out there on the Internet.

Do you have to just abandon all of your old links that are published out on the Internet when you migrate to Laravel?

We tried to use mod_rewrite to simply rewrite the URL to /order/step1/999 but because of the htaccess for laravel that isn't working.

RewriteRule ^/order/step1\.php\?service=([0-9]+)$ /order/step1/$1 [L,QSA]

We also tried adding a route into web.php like this:

Route::get('/step-1.php?service={slug}', 'PageController@step1');

and that doesn't work either.

We would like to be able to not lose all of our old URLs.



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2XPhwJR
via IFTTT

Aucun commentaire:

Enregistrer un commentaire