志福 的个人资料阿福台照片日志列表 工具 帮助
2007/9/25

《英雄的黎明》

大浪淘沙,
尘土归兮。
三国之志,
海纳英才。 
2007/9/20

[原创]手工交叉编译ARM版的Firefox手机浏览器插件gnash之Shell脚本

    这是手工交叉编译ARM版的Firefox手机浏览器插件gnash之Shell脚本。(这里我们用的版本是firefox-2.0.0.3_r2)

    有需要的朋友可以参考着配置一下,主要是一些编译环境变量的设置。具体可以参考官方的configure及open embedded中关于gnash交叉编译补丁文件。

    以下是arm编译环境配置脚本conf_arm.sh:


#!/bin/sh

export PROJECTSDK="/proj/oe/build_mnh/staging"
export PROJECTDIR="/root/qemu/gpephone/rootfs/home/gnash/gnash-0.8.1-arm"
#export PROJECTDIR="/root/qemu/gpe/rootfs/home/mozilla"
export PROJECTTARGET="arm-angstrom-linux-gnueabi"
export PROJECTBUILD="i686-linux"
export PROJECTHOST="arm-angstrom-linux-gnueabi"

export PATH="${PROJECTSDK}/../cross/bin":$PATH
export CC="arm-angstrom-linux-gnueabi-gcc"
export PKG_CONFIG_PATH="${PROJECTSDK}/${PROJECTTARGET}/lib/pkgconfig"

#export CFLAGS="-g -L${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib -pedantic -I${PROJECTSDK}/${PROJECTTARGET}/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive -fvisibility-inlines-hidden -fshort-wchar"
#export CPPFLAGS="-I${PROJECTSDK}/${PROJECTTARGET}/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive -fvisibility-inlines-hidden -fshort-wchar"

export CFLAGS="-g -L${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib -pedantic -I${PROJECTSDK}/${PROJECTTARGET}/include -fpermissive"
export CPPFLAGS="-I${PROJECTSDK}/${PROJECTTARGET}/include -fpermissive"

#export LDFLAGS="-Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-O1"
export LDFLAGS="-L${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib"

export CROSS_COMPILE="1"
export PROJECTCONFIG="${PROJECTDIR}/../mozconfig"
export PROJECT_OBJDIR="${PROJECTDIR}"

export CONFIGURE_ARGS="\
       --target=${PROJECTTARGET} \
       --host=${PROJECTHOST} \
   --build=${PROJECTBUILD} \
       --prefix=${PROJECTDIR}/output"
#export HOST_LIBIDL_CONFIG="PKG_CONFIG_PATH=${PROJECTSDK}/${PROJECTHOST}/lib/pkgconfig pkg-config libIDL-2.0"
#export HOST_LIBIDL_CFLAGS="`${HOST_LIBIDL_CONFIG} --cflags`"
#export HOST_LIBIDL_LIBS="`${HOST_LIBIDL_CONFIG} --libs`"

export BUILD_CC=gcc
export BUILD_CXX=g++
export BUILD_CFLAGS=
export BUILD_CXXFLAGS=
export BUILD_LDFLAGS=
export BUILD_RANLIB=ranlib
export BUILD_AR=ar

export HOST_CC="${BUILD_CC}"
export HOST_CXX="${BUILD_CXX}"
export HOST_CFLAGS="${BUILD_CFLAGS}"
export HOST_CXXFLAGS="${BUILD_CXXFLAGS}"
export HOST_LDFLAGS="${BUILD_LDFLAGS}"
export HOST_RANLIB="${BUILD_RANLIB}"
export HOST_AR="${BUILD_AR}"
echo "Configure for $PROJECTTARGET finished."

 



    以下是gnash编译脚本make_gnash_arm.sh:


#!/bin/sh

export PROJECTSDK="/proj/oe/build_mnh/staging"
export PROJECTDIR="/root/qemu/gpephone/rootfs/home/gnash/gnash-0.8.1-arm"
#export PROJECTDIR="/root/qemu/gpe/rootfs/home/mozilla"
export PROJECTTARGET="arm-angstrom-linux-gnueabi"
export PROJECTBUILD="i686-linux"
export PROJECTHOST="arm-angstrom-linux-gnueabi"

export PATH="${PROJECTSDK}/../cross/bin":$PATH
export CC="arm-angstrom-linux-gnueabi-gcc"
export PKG_CONFIG_PATH="${PROJECTSDK}/${PROJECTTARGET}/lib/pkgconfig"

#export CFLAGS="-g -L${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib -pedantic -I${PROJECTSDK}/${PROJECTTARGET}/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive -fvisibility-inlines-hidden -fshort-wchar"
#export CPPFLAGS="-I${PROJECTSDK}/${PROJECTTARGET}/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive -fvisibility-inlines-hidden -fshort-wchar"

export CFLAGS="-g -L${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib -pedantic -I${PROJECTSDK}/${PROJECTTARGET}/include -fpermissive"
export CPPFLAGS="-I${PROJECTSDK}/${PROJECTTARGET}/include -fpermissive"

#export LDFLAGS="-Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-O1"
export LDFLAGS="-L${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib"

export CROSS_COMPILE="1"
export PROJECTCONFIG="${PROJECTDIR}/../mozconfig"
export PROJECT_OBJDIR="${PROJECTDIR}"

export CONFIGURE_ARGS="\
       --target=${PROJECTTARGET} \
       --host=${PROJECTHOST} \
   --build=${PROJECTBUILD} \
       --prefix=${PROJECTDIR}/output"
#export HOST_LIBIDL_CONFIG="PKG_CONFIG_PATH=${PROJECTSDK}/${PROJECTHOST}/lib/pkgconfig pkg-config libIDL-2.0"
#export HOST_LIBIDL_CFLAGS="`${HOST_LIBIDL_CONFIG} --cflags`"
#export HOST_LIBIDL_LIBS="`${HOST_LIBIDL_CONFIG} --libs`"

export BUILD_CC=gcc
export BUILD_CXX=g++
export BUILD_CFLAGS=
export BUILD_CXXFLAGS=
export BUILD_LDFLAGS=
export BUILD_RANLIB=ranlib
export BUILD_AR=ar

export HOST_CC="${BUILD_CC}"
export HOST_CXX="${BUILD_CXX}"
export HOST_CFLAGS="${BUILD_CFLAGS}"
export HOST_CXXFLAGS="${BUILD_CXXFLAGS}"
export HOST_LDFLAGS="${BUILD_LDFLAGS}"
export HOST_RANLIB="${BUILD_RANLIB}"
export HOST_AR="${BUILD_AR}"
echo "Configure for $PROJECTTARGET finished."

 


[原创]手工交叉编译ARM版的Firefox手机浏览器之Shell脚本和mozconfig配置文件

    这是手工交叉编译ARM版的Firefox手机浏览器之Shell脚本和mozconfig配置文件。(这里我们用的版本是firefox-2.0.0.3_r2)

    有需要的朋友可以参考着配置一下,主要是一些编译环境变量的设置。具体可以参考官方的configure及open embedded中关于Firefox交叉编译补丁文件。

    ARM版的Firefox手机浏览器之Shell脚本:


#!/bin/sh

export MOZSDK="/proj/oe/build_mnh/staging"
#export MOZDIR="/root/qemu/gpephone/rootfs/home/mozilla"
export MOZDIR="/root/qemu/gpe/rootfs/home/mozilla"
export MOZTARGET="arm-angstrom-linux-gnueabi"
export MOZBUILD="i686-linux"
export MOZHOST="i686-linux"

export PATH="${MOZSDK}/../cross/bin":$PATH
export CC="arm-angstrom-linux-gnueabi-gcc"
export PKG_CONFIG_PATH="${MOZSDK}/${MOZTARGET}/lib/pkgconfig"

#export CFLAGS="-g -L${MOZSDK}/${MOZTARGET}/lib -Wl,-rpath-link,${MOZSDK}/${MOZTARGET}/lib -pedantic -I${MOZSDK}/${MOZTARGET}/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive -fvisibility-inlines-hidden -fshort-wchar"
#export CPPFLAGS=" -I${MOZSDK}/${MOZTARGET}/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive -fvisibility-inlines-hidden -fshort-wchar"

export CFLAGS="-g -L${MOZSDK}/${MOZTARGET}/lib -Wl,-rpath-link,${MOZSDK}/${MOZTARGET}/lib -pedantic -I${MOZSDK}/${MOZTARGET}/include -fpermissive"
export CPPFLAGS="-static -I${MOZSDK}/${MOZTARGET}/include -fpermissive -static"

#export LDFLAGS="-Wl,-rpath-link,${MOZSDK}/${MOZTARGET}/lib -Wl,-O1"
export LDFLAGS="-L${MOZSDK}/${MOZTARGET}/lib -Wl,-rpath-link,${MOZSDK}/${MOZTARGET}/lib -static"

export CROSS_COMPILE="1"
export MOZCONFIG="${MOZDIR}/../mozconfig"
export MOZ_OBJDIR="${MOZDIR}"

export CONFIGURE_ARGS="\
       --target=${MOZTARGET} \
       --host=${MOZHOST} \
   --build=${MOZBUILD} \
       --prefix=${MOZDIR}/output"
#export HOST_LIBIDL_CONFIG="PKG_CONFIG_PATH=${MOZSDK}/${MOZHOST}/lib/pkgconfig pkg-config libIDL-2.0"
#export HOST_LIBIDL_CFLAGS="`${HOST_LIBIDL_CONFIG} --cflags`"
#export HOST_LIBIDL_LIBS="`${HOST_LIBIDL_CONFIG} --libs`"

export BUILD_CC=gcc
export BUILD_CXX=g++
export BUILD_CFLAGS=
export BUILD_CXXFLAGS=
export BUILD_LDFLAGS=
export BUILD_RANLIB=ranlib
export BUILD_AR=ar

export HOST_CC="${BUILD_CC}"
export HOST_CXX="${BUILD_CXX}"
export HOST_CFLAGS="${BUILD_CFLAGS}"
export HOST_CXXFLAGS="${BUILD_CXXFLAGS}"
export HOST_LDFLAGS="${BUILD_LDFLAGS}"
export HOST_RANLIB="${BUILD_RANLIB}"
export HOST_AR="${BUILD_AR}"

case "$1" in
  configure)
    make \
      HOST_LIBIDL_LIBS="-L/proj/oe/build_mnh/staging/i686-linux/lib -lIDL-2" \
      HOST_LIBIDL_CFLAGS="-I/proj/oe/build_mnh/staging/i686-linux/include/libIDL-2.0" \
      -f ${MOZDIR}/client.mk \
      ${MOZDIR}/Makefile \
      ${MOZDIR}/config.status
  rm -rf ${MOZDIR}/js/jsautocfg.h
  cp -rf ${MOZDIR}/../jsautocfg.h ${MOZDIR}/js/src/
        ;;
  make)

    make \
      HOST_LIBIDL_LIBS="-L/proj/oe/build_mnh/staging/i686-linux/lib  -L/proj/oe/build_mnh/staging/arm-angstrom-linux-gnueabi/lib -lIDL-2" \
      HOST_LIBIDL_CFLAGS="-I/proj/oe/build_mnh/staging/i686-linux/include/libIDL-2.0 -I/proj/oe/build_mnh/staging/arm-angstrom-linux-gnueabi/include/glib-2.0" \
      -f ${MOZDIR}/client.mk \
      build
        ;;
  install)
      #echo ?
      make install
        ;;
  config)
      #echo ?
      ./configure --host=arm-angstrom-linux-gnueabi --build=i686-linux --target=arm-angstrom-linux-gnueabi
        ;;
  quit)
        echo $"Usage: $0 {configure|make}"
        exit 1
 ;;
  *)
        echo $"Usage: $0 {configure|make|install|config|quit}"
 ;;
esac

 




    mozconfig配置文件:


. $topsrcdir/browser/config/mozconfig

#system config
ac_add_options --host=arm-angstrom-linux-gnueabi
ac_add_options --target=arm-angstrom-linux-gnueabi
ac_add_options --build=i686-linux

# use GTK+-2 widget set with XFT font rendering
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-xft
ac_add_options --disable-freetype2

# enable minimal profile support
ac_add_options --disable-profilesharing
ac_add_options --disable-profilelocking
ac_add_options --enable-single-profile

ac_add_options --with-system-zlib
ac_add_options --with-system-jpeg
ac_add_options --with-system-png

ac_add_options --disable-accessibility
ac_add_options --disable-composer
#ac_add_options --enable-plaintext-editor-only
ac_add_options --disable-mailnews
ac_add_options --disable-ldap 
#ac_add_options --disable-postscript
ac_add_options --disable-mathml
ac_add_options --disable-jsd
ac_add_options --disable-installer
ac_add_options --disable-xprint
ac_add_options --disable-necko-disk-cache

# configure necko to allocate smaller network buffers
ac_add_options --enable-necko-small-buffers

# disable debug logging and tests
## #ac_add_options --disable-dtd-debug
ac_add_options --disable-dtd-debug
ac_add_options --disable-logging
## ac_add_options --enable-debug=-ggdb
ac_add_options --disable-debug
ac_add_options --disable-gtktest
ac_add_options --disable-tests
ac_add_options --disable-printing
ac_add_options --disable-gnomevfs
ac_add_options --disable-gnomeui

# build crypto module (PSM + NSS)
ac_add_options --enable-crypto

# build minimal set of protocol handlers
ac_add_options --enable-necko-protocols=http,file,res,jar,ftp,about,viewsource

# build minimal set of image decoders
ac_add_options --enable-image-decoders=png,gif,jpeg

#ac_add_options --enable-reorder
#ac_add_options --enable-elf-dynstr-gc

# enable static build
## #ac_add_options --disable-shared
ac_add_options --disable-shared
## #ac_add_options --enable-static
ac_add_options --enable-static
ac_add_options --enable-optimize=-O0

ac_add_options --enable-plugins
ac_add_options --enable-js-static-build



    同时有一个莫名的segmentation fault问题,需要在gtk+里面加一个以回国换行符结尾的且非空串的"printf(""string\n");",说起来很荒唐,但问题确实是存在的。具体的两个patch补丁如下:
    gtk+_2.10.14.bb:


require gtk-2.10.inc

PR = "r7"

SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-${PV}.tar.bz2 \
           file://no-xwc.patch;patch=1 \
           file://automake-lossage.patch;patch=1 \
           file://disable-tooltips.patch;patch=1 \
           file://gtklabel-resize-patch;patch=1 \
           file://menu-deactivate.patch;patch=1 \
           file://xsettings.patch;patch=1 \
           file://scroll-timings.patch;patch=1 \
           file://small-gtkfilesel.patch;patch=1 \
           file://migration.patch;patch=1;pnum=0 \
           file://run-iconcache.patch;patch=1 \
           file://hardcoded_libtool.patch;patch=1 \
           file://no-demos.patch;patch=1 \
           file://single-click.patch;patch=1 \
           file://spinbutton.patch;patch=1 \
           file://gtk+-handhelds.patch;patch=1 \
           file://filesel-fix-segfault.patch;patch=1 \
           file://combo-arrow-size.patch;patch=1;pnum=0 \
           file://range-no-redraw.patch;patch=1;pnum=0 \
           file://scrolled-placement.patch;patch=1;pnum=0 \
           file://treeview-checkbox-size.patch;patch=1;pnum=0 \
           file://cell-renderer-edit-focus.patch;patch=1;pnum=0 \
           file://gtk+-range-segmentation-fault.patch;patch=1 \
           "

# check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points
require gtk-fpu.inc
EXTRA_OECONF += "${@get_gtk_fpu_setting(bb, d)}"

# try to squeeze some more performance out of it
SRC_URI_append_fic-gta01 = " file://lower-quality-scaling-in-pixbuf-engine.patch;patch=1"
SRC_URI_append_fic-gta02 = " file://lower-quality-scaling-in-pixbuf-engine.patch;patch=1"

# this doesn't seem to work
SRC_URI_OVERRIDES_PACKAGE_ARCH = "1"
# let's do it manually then
PACKAGE_ARCH_fic-gta01 = "fic-gta01"
PACKAGE_ARCH_fic-gta02 = "fic-gta02"



    gtk+-range-segmentation-fault.patch:


--- gtk+-2.10.14/gtk/~gtkrange.c 2007-09-03 13:33:22.000000000 +0800
+++ gtk+-2.10.14/gtk/gtkrange.c 2007-09-03 13:34:37.000000000 +0800
@@ -632,7 +632,9 @@ gtk_range_set_adjustment (GtkRange     
      GtkAdjustment *adjustment)
 {
   g_return_if_fail (GTK_IS_RANGE (range));

+
+  printf("[QFirefox] gtk_range_set_adjustment.\n");
+
   if (!adjustment)
     adjustment = (GtkAdjustment*) gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
   else

2007/9/12

[原创]巧用IISReWrite实现域名解析与静态化

这是一些IISReWrite的配置文件,是我以前一直用来配合IIS实现网站的域名解析和目录的绑定,以及网页链接的静态化。

  有需要的朋友可以参考着配置一下,主要是一些正则表达式的运用。具体语法可以参考官方手册。


[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
 
#Fix missing slash char on folders
RewriteCond Host: (.*)
RewriteRule ([^.?]+[^.?/]) http\://$1$2/ [I,R]
 
# 泛域名解析 Rewrite规则

#############################################################
#                   afutai.com
#############################################################
#Emulate site1
#RewriteCond Host: (?:wap\.|wsrd\.|wsc\.|www\.)?afutai\.com\:8009
#RewriteRule ^/(.*) /asp/domain/$1 [I,L]

#Emulate Site www.afutai.com
#http://wap.afutai.com:8009/index.html -> http://wap.afutai.com:8009/asp/afutai/afutai/index.html
RewriteCond Host: (?:www\.)?(?:afutai|3nuo|nuoji)\.(?:com|net)
RewriteRule ^/(.*) /others/root/afutai/$1 [I,L]
#Emulate Site wap.afutai.com
#http://wap.afutai.com:8009/index.html -> http://wap.afutai.com:8009/asp/afutai/afutai/index.html
RewriteCond Host: (?:wap\.)afutai\.com
RewriteRule ^/(.*) /others/root/afutai/$1 [I,L]
#Emulate Site wsrd.afutai.com,wsc.afutai.com
#http://wap.afutai.com:8009/index.html -> http://wap.afutai.com:8009/asp/afutai/afutai/index.html
#RewriteCond Host: (?:wsrd\.|wsc\.)?afutai\.com
#RewriteRule ^/(.*) /others/root/afutai/wsc/$1 [I,L]
#RewriteCond Host: (?:blog\.)afutai\.com
#RewriteRule ^/asp/(.*) /others/root/afutai/asp/$1 [I,L]
RewriteCond Host: (?:blog\.)afutai\.com
RewriteRule ^/(.*) /others/root/afutai/$1 [I,L]

#映射blog.afutai.com的8009端口
RewriteCond Host: (?:blog\.|www\.)afutai\.com\:8009
RewriteRule ^/(.*) /others/root/afutai/$1 [I,L]
#RewriteProxy ^/(.*) http\://www.afutai.com/$1 [I,U]
#############################################################
#                   hundsun.net
#############################################################
#Emulate Site www.hundsun.net
#http://www.hundsu.net/ -> /others/root/timinet/
RewriteCond Host: (?:www\.)?(?:hundsun)\.(?:com|net)
RewriteRule ^/(.*) /others/root/$1 [I,L]
#############################################################
#                   51bishe.com
#############################################################
#Emulate Site www.afutai.com
#http://wap.afutai.com:8009/index.html -> http://wap.afutai.com:8009/asp/afutai/afutai/index.html
RewriteCond Host: (?:www\.)?(?:51bishe|biye120)\.(?:com|net)
RewriteRule ^/(.*) /others/root/bullfrog/$1 [I,L]
 
#############################################################
#############################################################
#############################################################
#############################################################

#RewriteCond Host: (?:wsc\.)afutai\.com
#RewriteRule (.+) http\://www.alrzj.com$1 [R]
#RewriteRule (.+) http\://192.168.100.100$1 [R]

#good
######################################################################
#Emulate site2
#RewriteCond Host: (?:blog\.)?afutai\.com\:8009
#RewriteRule (.*) /asp/afutai/afutai/$1 [I,L]
#Emulate site2
#RewriteCond Host: (?:blog\.)?afutai\.com\:8009
#RewriteRule (.*) /asp/afutai/afutai/index.html$1 [I,L]
# Afutai Rewrite规则
#RewriteRule ^/index([\.a-zA-Z0-9]*)$ /asp/domain/index\.asp
#RewriteRule ^(http://wap.afutai.com:8009)/index([\.a-zA-Z0-9]*)$ $1/asp/domain/index\.asp
#RewriteRule ^(wap\.afutai\.com\:8009)/(.*)$ $1/asp/$2
#RewriteRule ^(.*?\.asp) /asp/domain/index\.asp
#             http://wap.afutai.com:8009/index.htm
 
 
 
 
 
# Discuz4.10 Rewrite规则
#RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)$ $1/archiver/index\.php\?$2
#RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay\.php\?fid=$2&page=$3
#RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3
#RewriteRule ^(.*)/profile-(username|uid)-(.+)\.html$ $1/viewpro\.php\?$2=$3
 
# SupeSite Rewrite规则
#RewriteRule ^(.*)/bbs/archiver/([a-z0-9\-]+\.html)$ $1/bbs/archiver/index.php?$2
#RewriteRule ^(.*)/bbs/forum-([0-9]+)-([0-9]+)\.html$ $1/bbs/forumdisplay.php?fid=$2&page=$3
#RewriteRule ^(.*)/bbs/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/bbs/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
#RewriteRule ^(.*)/bbs/profile-(username|uid)-(.+)\.html$ $1/bbs/viewpro.php?$2=$3
#RewriteRule ^/([0-9]+)/spacelist(.*)$ /index\.php\?$1/action_spacelist$2
#RewriteRule ^/([0-9]+)/viewspace(.+)$ /index\.php\?$1/action_viewspace_itemid$2
#RewriteRule ^/([0-9]+)/viewbbs(.+)$ /index\.php\?$1/action_viewbbs_tid$2
#RewriteRule ^/([0-9]+)/(.*)$ /index\.php\?$1/$2
#RewriteRule ^/([0-9]+)$ /index\.php\?$1
#RewriteRule ^/action(.+)$ /index\.php\?action$1
#RewriteRule ^/category(.+)$ /index\.php\?action_category_catid$1
#RewriteRule ^/itemlist(.+)$ /index\.php\?action_itemlist_catid$1
#RewriteRule ^/viewnews(.+)$ /index\.php\?action_viewnews_itemid$1
#RewriteRule ^/viewthread(.+)$ /index\.php\?action_viewthread_tid$1
#RewriteRule ^/index([\.a-zA-Z0-9]*)$ /index\.php