| Author |
Message |
bizarre12
Newbie


Joined: Mar 15, 2008
Posts: 4
|
Posted:
Sat Aug 09, 2008 3:48 pm |
|
I'm trying to rewrite let's say
"(?<!/)modules.php\?name=modules.php?name=News&new_topic=4"',
to some subject like
'this_subject',
the same with topic=5/6/7
and different rewrite to each "topic"
but it doesn't work,
Itried to do it in GT-Topics, and GT-News
the reason for that is that i want to have normal name in url bar than
article-topic 1/2/3/4/
what am i doing wrote? |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 952
|
Posted:
Sun Aug 10, 2008 10:44 am |
|
ShortLinks can only tap the links using information from the links themselves. The link you posted, for example, does not have the subject in it, so it can't be tapped the way you wish. You would have to modify News and Topics module index.php to add the subject onto the URL... then you might be able to tap it. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 308
|
Posted:
Tue Aug 12, 2008 3:57 am |
|
|
|
 |
xiketuan
Newbie


Joined: Nov 11, 2008
Posts: 10
|
Posted:
Wed Nov 12, 2008 3:36 am |
|
shortalink can convert to :
| Code: |
| RewriteRule ^article-([0-9]*)-([a-z]*)-([0-9]*)-([0-9]*).html modules.php?name=News&file=article&sid=$1&mode=$2&order=$3&thold=$4 [L] |
replay to :
| Code: |
| RewriteRule ^article/([0-9]*)/([a-z]*)/([0-9]*)/([0-9]*) modules.php?name=News&file=article&sid=$1&mode=$2&order=$3&thold=$4 [L] |
preview error :
The webpage cannot be found |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 308
|
Posted:
Wed Nov 12, 2008 4:52 am |
|
|
|
 |
xiketuan
Newbie


Joined: Nov 11, 2008
Posts: 10
|
Posted:
Sat Nov 15, 2008 12:07 pm |
|
file GT-News.php :
$urlin = array(
'"(?<!/)modules.php\?name=News&op=viewcat&catid=([0-9]*)&page=([0-9]*)"', ..........);
$urlout = array(
'article-category\\1-page\\2.html',
file : .htaccess :
| Code: |
| RewriteRule ^article-category([0-9]*)-page([0-9]*).html modules.php?name=News&op=viewcat&catid=$1&page=$2 [L] |
i want use : category/2/1 , hep |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 308
|
Posted:
Sat Nov 15, 2008 12:18 pm |
|
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 952
|
Posted:
Sun Nov 16, 2008 10:03 am |
|
If you are going to be hacking code to this extent, I would suggest picking up some good books on PHP, MySQL, and something on regular expressions.
A web site admin just has to learn these things in order to be effective.
Re-coding ShortLinks for you from the '-' to '/' is not something I have time to do for you and quite frankly, it is not that difficult of a thing to do. Have you even given it a try? |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
|
|