Answer the question
In order to leave comments, you need to log in
How to make CNC in PHP from database fields?
Couldn't find a good answer anywhere. Himself in php is not very good, only basic knowledge.
Now the site is configured with a manual redirect of the type
if($_SERVER['REQUEST_URI'] == "/fabrik.php?fdoc=18")
{
header("HTTP/1.1 301 Moved Permanently");
Header("Location: http://".$_SERVER['HTTP_HOST']."/bordignon-camillo");
exit;
}
Answer the question
In order to leave comments, you need to log in
Alternatively, you can take the fdoc parameter from the $_GET variable, and fetch the SEO value from the database by the ID column. Then substitute this value in header()
$sql = "SELECT seo FROM tbl WHERE ID = $_GET['fdoc'] ";
Header("Location: http://".$_SERVER['HTTP_HOST']."/".$seo);
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^fabrik.php?fdoc=176$ /bianchini-capponi [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^bianchini-capponi$ /fabrik.php?fdoc=176 [L]
##################
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME } !-d
RewriteRule ^fabrik.php?fdoc=17$ /bonaldo [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^bonaldo$ /fabrik.php?fdoc= 17[L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question