NextJS rewrite load issue
Unanswered
Basset Fauve de Bretagne posted this in #help-forum
Basset Fauve de BretagneOP
I'm trying to point a url to an external website but it doesn't load the css properly
simplest example here is google
simplest example here is google
async rewrites() {
return [
{
source: "/",
destination: "https://www.google.com/",
},
];3 Replies
Basset Fauve de BretagneOP
Spectacled bear
Hey, have you managed to find a solution to this? Having same issues.
Snowshoe
Seems similar to an issue I'm facing... the thing to keep in mind, when you re-write a URL like that... all the assets included on that page are going to now try to be pulled from your domain. so that broken google image is probably something like /somefolder/google-logo.webp ... which works when that page is on the google.com domain, because those assets live there. But when you re-write it, /somefolder/google-logo.webp does not exist on localhost... You would probably need more rewrites for all the assets on that page, or re-create them locally on your site.