It seems we have some weird broken incoming links for our website that we would like to redirect. We are using Laravel on Apache.
Here is the incoming url: /flannel-sheets%C2%A0
Here is where we want to send it: /flannel-sheets
%C2%A0 seems to decode to a strange space.
I have tried these lines in the web.php
file
$this->get( 'flannel-sheets%C2%A0', function() { return redirect( '/flannel-sheets' ); });
$this->get('flannel-sheets ', function() { return redirect( '/flannel-sheets' ); });
$this->get('flannel-sheets$nbsp;', function() { return redirect( '/flannel-sheets' ); });
I have also tried using Apache redirects in my 000-default.config
and .htaccess
files
Redirect 301 /flannel-sheets%C2%A0 https://example.com/flannel-sheets
Neither of these methods are working for me. What should I do?