I have a php file lets say test.php?x=1 with .htaccess i can rewrite the url.
Here is my .htaccess
RewriteEngine on
RewriteRule ^some-page_([0-9]+)_(.+)?$ test.php?x=$1 [L]
Normally i can write whatever i want write after x on the url.
Now here is the thing that i want to make;
In the test.php file there is a variable $name.
I want to write that variable into .htaccess thus i would like to make make link below
localhost/some-page_1_SOME-TEXT-COMING-FROM-VARIABLE
How could i do that? Thank you.
That second line with allow you to just have localhost/some-page_1 work as well.
The above will, or should, rewrite the first line below into the bottom URL: