I
I
IJIL2014-11-06 03:39:39
URL Handling
IJIL, 2014-11-06 03:39:39

How to correctly set the rule for the CNC?

I just can not find a solution, I broke my whole head.
There is a function in class.Rewrite.php

$tpl = preg_replace('/index.php([?])p=showforum&fid=([\d]*)&t=([\w-]*)/i', $arr['forum'] . '/\\2/\\3/', $tpl);

There is an xtackss rule
RewriteRule ^forum/([0-9]+)/([-_A-Za-z0-9-]+)/([^/]*)$ index.php?p=showforum&fid=$1&t=$2 [NC,L]

and there is also xtaxes.php
$rew[] = 'RewriteRule ^' . $arr['forum'] . '/([0-9]+)/([-_A-Za-z0-9-]+)/([^/]*)$ index.php?p=showforum&fid=$1&t=$2 [NC,L]';

That is, from such a link /index.php?p=showforum&fid=3&t=tema
It turns out forum/3/tema/
I just can’t catch up with how to make it just /tema

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Elena, 2014-11-06
@Nidora

Put away
/([0-9]+)/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question