I have a simple php and htaccess question.
I have this $_GET :
if(isset($_GET['word'])) {
if (isset($_GET['id'])) {
}
}
So the url will be :
example.com/index.php?word=test&id=555
Now, i want to convert the url to :
test.example.com/555/
i have a htaccess code like this :
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^([^.]+) [NC]
RewriteCond %{QUERY_STRING} !(?:^|&)word=[^&]+(?:&|$) [NC]
RewriteRule ^ %{REQUEST_URI}?word=%1 [QSA,L]
But it is just for one variable, not both of them.
How can i do that with htaccess ?