AR
BDplanet wrote:
i want re-write my index.php
it output now loking
http://rexmob.com/index.php?page=category&id=889&indir=Mobile-Themes
but i want
http://rexmob.com/category/889/Mobile-Themes.html
Its like this. 😉
RewriteRule ^/page/([a-z]+)/id/([0-9]+)/indir/([a-zA-Z-]+)\.html$ index.php?page=$1&id=$2&indir=$3
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
AR
Yep. 🙂
somesite.tld/page/category/id/889/indir/Mobile-Themes.html
This,
category/889/Mobile-Themes.html
... i never tried to rewrite, i think its should be the code like,
if (isset($_GET['category'])) {
if (isset($_GET['id'])) {
if (isset($_GET['Mobile-Themes'])) {
// page...
}
}
}
But i guess its not the case here. 🙂
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
AR
just_m3. wrote:
For me it works like this 🤣
<?php
/* make a php file named checkitout.php
and add.htaccess lines
RewriteEngine on
RewriteRule ^([^/]*)/([^/]*)/([^/]*)\.html$ /checkitout.php?page=$1&id=$2&indir=$3 [L]
*/
/*Now let's check it out :D */
if(isset($_GET['page'])){echo 'Page-> '.$_GET['page'].' & Id -> '.$_GET['id'].' & Indir -> '.$_GET['indir'].'';}
else{$myid='889';
$mydir='My-wap-category';
// link is looking like this http://127.0.0.1/category/889/My-wap-category.html
echo "<a href=\"/category/$myid/$mydir.html\">Test rewrite</a> ";}
?>
Posted link was index.php?page=category&id=889&indir=Mobile-Themes and for that this is not gonna work without recoding php, which is totally different story. 😉
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***