I have actually written a htaccess rewrite rule for creating wildcard subdomain from get method but the problem is that I can't use any other get variable on the page.
here is the website
https://mywebsite.efficientpoint.com/test_view?id=cloth
variable id is undefined
test_view.php
$id= $_GET['id'];
$sitePostName = $_GET['url'];
<h1>The website url is (<?php echo $sitePostName; ?>)</h1>
<h4>The product is (<?php echo $id; ?>)</h4>
.htaccess
RewriteRule ^([aA-zZ])$ test_view.php?url=$1
RewriteCond %{HTTP_HOST} ^(^.*).efficientpoint.com
RewriteRule (.*) test_view.php?url=%1
OUTCOME:
The website url is (mywebsite)
The product is ()
So you see the bracket for product is blank.
Please I will be grateful if anyone can help me out there.
Thank you.
question from:
https://stackoverflow.com/questions/65897352/wildcard-subdomains-using-htacess-with-multiple-variables 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…