Am facut redirect 301 la index.htm, html, php spre home.
Am rezolvat si problema /// adaugand codul de mai jos.
if ( strpos($_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"], "//") ) {
if ($_SERVER["HTTPS"] == "on") {
header('Location: ' . "https: //" . preg_replace("([/]+)", "/", $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]));
} else {
header('Location: ' . "http: //" . preg_replace("([/]+)", "/", $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]));
}
}
In .htacces am mai adaugat un cod gasit pe google care face redirect catre versiunea cu /
RewriteRule ^/*(.+/)?([^.]*[^/])$ http: //%{HTTP_HOST}/$1$2/ [R=301,L]
Am postat cu : // deoarece nu am putut pune ://
Pot face redirect spre homepage la erorile 404 ?
De azi voi incepe exploatarea la petrol![]()




Răspunde cu citat