0
I am with the following problem, I made a URL friendly, but it is giving "conflict" when I use ajax in my Forms, when I click on Ubmit, it duplicates my site, my checks are like this
if(isset($_GET['url'])){
$url=$_GET['url'];
$sepURL=explode('/',$url);
}
$diretorio="paginas";
if(empty($sepURL)){
include_once("$diretorio/home.php");
}elseif(isset($sepURL[0]) && $sepURL[0] == 'classificados' || isset($sepURL[0]) && $sepURL[0] == 'noticias'){
include_once("$diretorio/class.php");
}elseif(isset($sepURL[0]) && $sepURL[0] == 'contato'){
include_once("$diretorio/contato.php");
}
with this check, he is duplicating the site when I press some Ubmit that uses ajax on the site, someone knows how to solve?
would have a function to URL only to get files that are inside the pages directory ? so I think it would be easier and simple
– goio
that’s not what you’re doing ? then just set the specific routes for the ajax requests, so each file would be respective the route
– Fedhrm
will not old
url:"ajax/busca.php",
– goio
that is why you are putting the file in another directory not ?
– Fedhrm
yes, just not the conflict between my pages and ajax, even so he is duplicating the site, in my modal with ajax, instead of opening the content of it, open the entire site within it, understood?
– goio