Support the ongoing development of Laravel.io →
Installation Configuration Requests
Last updated 2 years ago.
0

You could try something in your htaccess like:

redirect /~account/oldfile.html http://www.whatever.com/~account/newpage.html

Works like: redirect <oldfile relevant path> <url to go to>

You can also do url paths (probably more effective):

redirect /~account/old_dir/ http://www.whatever.com/~account/new_dir/

Maybe a temporary fix in the long run, but works.

** You must use a FULL url for the '<url to go to>'

Last updated 2 years ago.
0

@ayyobro - Unfortunately it didn't work..

Last updated 2 years ago.
0

Unfortunate... hmm.. are you on Apache or Nginx server?

Edit: obviously Apache if you have .htaccess for this and not config...

Off the top of my head, let's try:

RewriteCond %{THE_REQUEST} ^.*/index\.php RewriteRule ^(.*)index.php$ /$1 [R=301,L]

THE_REQUEST being the request uri

Experiment putting this line in different places, putting it before or after some of the other configurations may or may not make it work

Last updated 2 years ago.
0

Yes! This worked! I had to change it a little bit so it will redirect "/index.php/some-url" to "/some-url" also. The final version looks like this:

  RewriteCond %{THE_REQUEST} ^.*/index\.php
  RewriteRule ^index.php(.*)$ /$1 [R=301,L]

Thank you a lot for your help! I implemented a temporary solution with php which I loaded in bootstrap/start.php before everything else, but I prefer this version with htaccess.

Thanks again! Have a great day!

Last updated 2 years ago.
0

Fantastic!

Happy coding!

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.