: Try either RewriteRule ^first-page/$ /subdir/page.php?id_page=1 [QSA,L] RewriteRule ^second-page/$ /subdir/page.php?id_page=2 [QSA,L] RewriteRule ^third-page/$ /subdir/page.php?id_page=161 [QSA,L] or RewriteRule
Try either
RewriteRule ^first-page/$ /subdir/page.php?id_page=1 [QSA,L]
RewriteRule ^second-page/$ /subdir/page.php?id_page=2 [QSA,L]
RewriteRule ^third-page/$ /subdir/page.php?id_page=161 [QSA,L]
or
RewriteRule ^first-page /subdir/page.php?id_page=1 [QSA,L]
RewriteRule ^second-page /subdir/page.php?id_page=2 [QSA,L]
RewriteRule ^third-page /subdir/page.php?id_page=161 [QSA,L]
The $ character tells Apache that this is the end of string and no more characters are expected. So you'll have to notify it to accept the slash at the end of the string, or to just be ready for any extra characters. You can use the ? flag to make the trailing slash not required, but accepted if present, e.g.:
RewriteRule ^first-page(/)?$ /subdir/page.php?id_page=1 [QSA,L]
So this won't let any other characters other than slash.
Hope this helps.
More posts by @Merenda212
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.