diff --git a/scripts/change_url b/scripts/change_url index 9129e0c..390db63 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -100,9 +100,17 @@ fi # ... #================================================= if [ $new_path = "/" ]; then - ynh_replace_string "$old_domain$old_path" "$new_domain" "$final_path/config.php" + if [ $old_path = "/" ]; then + ynh_replace_string "://$old_domain" "://$new_domain" "$final_path/config.php" + else + ynh_replace_string "://$old_domain$old_path" "://$new_domain" "$final_path/config.php" + fi else - ynh_replace_string "$old_domain$old_path" "$new_domain$new_path" "$final_path/config.php" + if [ $old_path = "/" ]; then + ynh_replace_string "://$old_domain" "://$new_domain$new_path" "$final_path/config.php" + else + ynh_replace_string "://$old_domain$old_path" "://$new_domain$new_path" "$final_path/config.php" + fi fi #=================================================