Costruire Siti Web

Виконано Опубліковано %project.relative_time Оплачується при отриманні
Виконано Оплачується при отриманні

We have to rewrite the url:

[url removed, login to view]

to

[url removed, login to view]

The URL is currently composed as follows:

[url removed, login to view] ( .com/offerte-lavoro/[url removed, login to view] )

[url removed, login to view]

[url removed, login to view]

The -a- functions to distinguish keywords 1 (profession) from keyword 2 (location).

The "per-" and "-a-" must remain only when there is the keyword 1 (profession):

[url removed, login to view]

[url removed, login to view]

[url removed, login to view]

It is modify this PHP code:

if( strpos($this->uri,"/per") !== false )
{
//$canonical_link =
if ($_SERVER['REQUEST_METHOD'] === 'GET'
and !isset($_GET['action'] )) {

$subject = $this->uri;
//echo "get <br/>". $subject;
$re = "/^\/per-(.*).html/"; /* added string by gabriel */
//$re = preg_replace ("per-", "", $res[0]);

preg_match($re, $subject, $matches);
//preg_match($re, $str, $matches);
$res = preg_split("/-a-/",$matches[1]);
$keyword = preg_replace ("/-/", " ", $res[0]);
$location="";

//var_dump($res);
if( isset($res[1]))
{
$location = $res[1];
}

//echo $location ;die ;
$_REQUEST['action'] = "search";
$_REQUEST['listing_type'] = array('equal'=>"Job");
$_REQUEST['keywords'] = array('all_words'=>$keyword) ;
$_REQUEST['Location']["location"] = array () ;
$_REQUEST['Location']["location"]["value"] = $location;
$_REQUEST['Location']["location"]["radius"] = "10";

$_GET['action'] = "search";
$_GET['listing_type'] = array('equal'=>"Job");
$_GET['keywords'] = array('all_words'=>$keyword) ;
$_GET['Location']["location"] = array () ;
$_GET['Location']["location"]["value"] = $location;
$_GET['Location']["location"]["radius"] = "10";
$location = str_replace(" ", "-", $location);
}
//var_dump($_REQUEST); die ;
$this->uri = "/per/";

}

Графічний дизайн HTML PHP Веб-дизайн

ID Проекту: #10886574

Про проект

7 заявок(-ки) Дистанційний проект Остання активність 7 роки(ів) тому

Доручено:

phosphore

Ciao gbrasile20! Ho visto che mi hai invitato al progetto e sarei felice di darti una mano. Lo script PHP che hai descritto richiede un paio di modifiche per farlo funzionare come vuoi tu. Quando puoi scrivimi in modo Більше

€22 EUR за 1 день
(1 відгук)
1.9

7 фрілансерів(-и) готові виконати цю роботу у середньому за €28

peppinoibra

Buongiorno, posso finire questo lavoro in poche ore senza nessuna complicazione. Sono disponibile fin da subito, grazie mille.

€30 EUR за 0 дні(-в)
(9 відгуків(и))
3.3
mr4eshir

Got it. You have WordPress, and it allows to easily change links as you want it. I don't expect any troubles with the task, but in case of some troubles, I'll be need to do some work in DB (clear old links, which are s Більше

€23 EUR за 1 день
(1 відгук)
0.8
AntonioSilletta

Posso cambiare l'url in pochi secondi...è semplicissimo! Se è interessata a ricevere il mio aiuto mi contatti! I can do this in few easy step!

€23 EUR за 1 день
(0 відгуків(и))
0.0
LuigiDonato

Ciao, se sei interessato, posso lavorarci già domani.. Non ci vorrà molto.. In caso contattami tramite chat

€34 EUR за 1 день
(0 відгуків(и))
0.0