Answer the question
In order to leave comments, you need to log in
Help with htaccess regex
I want to redirect from an address like:
site.com/play/?t=title&l=link to site.com/title.html
I write:
RewriteEngine On
RewriteBase /
RewriteRule ^play/\?t=([a-z0-9-_]+)&l=[a-z0-9-_.:/]+$ $1.html [R]
Answer the question
In order to leave comments, you need to log in
So just write a PHP script, your parameters are not contained in the path, but after the '?' sign.
index.php
<?php
$t=$_GET['t'];
$l=$_GET['l'];
include $t.".html";
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question