Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 1 year ago.
0

I am guessing that as laravel forge is providing vps service with ssh access you should be able to update your nginx config file (if your using nginx as your http service) to do so. Within mine I have the following at the top of each of my domain config files to redirect all non www traffic to the with www-prefix domain:

# non-www to www redirect
server {
    listen 80;
    server_name photogabble.co.uk;
    return 301 $scheme://www.photogabble.co.uk$request_uri;
}

It is of course a 301 so that google and other search engines index correctly.

If you need more specific details let me know and I can give you a walk through.

Last updated 8 years ago.
0

when i add this i get redirect loops any idea why this might happen? you can see a post about my issue here https://laracasts.com/discuss/channels/forge/redirect-loop-for...

0

Sign in to participate in this thread!

Eventy

Your banner here too?

marktopper marktopper Joined 25 May 2014

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.