XOOPS URL Overwrites | XOOPS MOD_REWRITE Let Dynamic Page Static Display, Heart ... Let's start, everything from Jane. Xoops MOD_REWRITE: Probably step: 1. You know the general application operation of Apache, please continue to see 2. You are server management Member, please continue to see 3. You have a fixed IP address, please continue to see 4. You don't have an IP address, please continue to see -_-! ! ! 5. Set the virtual host 6. Precautions 7. Rewind application, I will not explain to you, nor to explain, Apache's mod_rewrite is not easy to explain. . . 8. Modify template 9. Complete ----------------------------------------- ------------------------------------- 1. 2. 4. No good saying, below Start setting virtual host: 5. Try (I use the name virtual host, this you can use flexible _): Mixing port and IP-based virtual host | Mixing domain name and IP-based virtual host if your server is Two IP addresses (172.20.30.40 and 172.20.30.50) respectively correspond to domain name www.example1.com and www.example2.org. For each domain name, you want to publish your website at the 80-port and 8080 ports. You can configure this: Server Configuration Listen 172.20.30.40:80 Listen 172.20.30.40:8080 Listen 172.20.30.50:80 Listen 172.20.30.50:8080
Server Configuration Listen 80 NameVirtualHost 172.20.30.40
Options Followsymlinks Allowoverride All ORDER ALOW, DENY Allow from All DIRECTORY> # ------------------------------- ------ Overwritten ReWriteEngine On # ------------------ News Modules ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Reword content REWRITERULE /MODULES/NEWS/topic_(. /.htm @ /modules/news/index.php?storytopic=1 [l] # http://gi.2288.org:88/modules/news /index.php?storytopic=2 # http://gi.2288.org:88/modules/news/topic_2.htm Rewriterule /Modules/news/Article_([0-9] ).htm full of / modules / news /article.php?storyid= $1 # http://gi.2288.org:88/modules/news/index.php?storytopic=312 # http://gi.2288.org:88/modules/news/Article_312 .htm shutriteerule /modules/news/topic(.* )-( )/.htm full /Modules/news/index.php?storytopic= $ 1&Start= $2 # http://gi.2288.org:88/ Modules / news / index.php? storytopic = 312 # http://gi.2288.org:88/modules/news/Article_312.htm Rewriterule /Modules/news/Archive/.htm full of /modules/news/archive.php Rewriterule /Modules/news/index.htm owverage@php # -------------------- News Modules --------- ------------ Reword content # -------------------- Wfdownloads Modules ---------- Override content REWRITERULE /MODULES/WFDownloads/topic_ (. ) /.htm full of /modules/wfdownloads/viewcat.php?cid= $ 1 [l] # http://gi.2288.org:88/modules/mydownloads/viewcat.php?cid=9 # http: // gi. 2288.org:88/modules/mydownloads/topic_9.htm Rewriterule /Modules/wfdownloads/topic_o_(.).. = $ / /Modules/wfdownloads/ViewCat.php?op=1 [l] # http: // gi.2288.org:88/modules/mydownloads/ # http://gi.2288.org:88/modules/mydownloads/ RewriteRule /modules/wfdownloads/newlist/.htm$ /modules/wfdownloads/newlist.php RewriteRule / Modules / wfdownloads / hit _ /. htm $ /modules/wfdownloads/topten.php?list=
Hit # http://gi.2288.org:88/modules/wfdownloads/topten.php?list=hit # http://gi.2288.org:88/modules/wfdownloads/hit.htm Rewriterule / Modules / Wfdownloads /rate/.htm ownel / /modules/wfdownloads/topten.php?list=rate # http://gi.2288.org:88/modules/wfdownloads/topten.php?list=rate # http: //gi.2288 or 罗: l 8.. $ 8 8 8 8 8 8 8 8 8::: 8 8 8 8 8 8 8 8 8 8 8 8 $ 8 8 8:: 8 $ $.. $ /Modules/wfdownloads/singlefile.php?cid= $1&lid= $ 2 # http://gi.2288.org:88/modules/wfdownloads/singlefile.php?cid=4&lid=131 # http: //gi.2288. Org: 88 / Modules / Wfdownloads / Down4-131.htm Rewriteerule /Modules/wfdownloads/list_( (.* )/.htm @/modules/wfdownloads/viewcat.php?list= $1 # http://gi.2288.org : 88 / Modules / WfDownloads / Viewcat.php? List = l # http://gi.2288.org:88/modules/wfdownloads/list_l.htm # --------------- ----- Wfdownloads Modules ---------- Reword content # ------------------- MyDownloads Modules Rewriterule / Modules / MyDownloads / INDEX .htm $ / modules /Mydownloads/index.php shutriteerule /modules/mydownloads/topic_(. )/.htm @ /modules/mydownloads/viewcat.php?cid= $ 1 [l] RewriteRule /Modules/mydownloads/hit_(. )/htm $ /Modules/mydownloads/topten.php?hit= $1 [l] Rewriterule /Modules/mydownloads/topten_ (. )/.htm full / tydules/mydownloads/topten.php?rate= $1 [l] REWRITERULE / MODULES / MYDOWNLOADS / DOWN (. *) - (. *) /. htm $ /modules/mydownloads/singlefile.php?cid= $ 1&lid= $ 2 # -------------------------------------------------------------------------------------------------- --MYALBUM REWRITERULE / MYALBUM REWRITERULE / MYALBUM REWRITERULE / MYALBUM REWRITERULE / MYALBUM REWRITERULE / MYTM$ /Modules/myalbum/index.php riterule /modules/myalbum/hit_( )/tm full of /modules/myalbum/topten.php?hit=1 REWRITERULE / Modules / myalbum / photo _ (.
) /. htm $ /Modules/myalbum/photo.php?lid= $1 [l] # http://gi.2288.org:88/modules/myalbum/photo.php?lid=1532 # http: // gi .2288.org: 88 / modules / myalbum / photo_1532.htm shutriterule /modules/myalbum/topic_(. /.htm full of /modules/myalbum/viewcat.php?cid=1 [l] # http: // gi .2288.org: 88 / modules / myalbum / viewcat.php? CID = 48 # http://gi.2288.org:88/modules/myalbum/topic_48.htm shutriterule /modules/myalbum/view(.*) (. *) /. htm $ /modules/myalbum/viewcat.php?num= $ 1&cid= $2 rebriterule /modules/myalbum/photo(.htm full of / modules / myalbum / pHOTO. PHP? LID = $ 1 & CID = $ 2 # http://gi.2288.org:88/modules/myalbum/photo.php?lid=914&cid=34 # http://gi.2288.org:88/modules/myalbum /Photo914-34.htm # -------------------- Ams Rewriterule /Modules/Ams/index.htm full /Modules/Ams/index.php Rewriterule / Modules / AMS / Archive.htm $ /Modules/AMS/Archive.php Rewriterule /Modules/ams/Article_ (. )/.htm full /Modules/ams/Article.php?storyID= $ 1 # http: //gi.2288. ORG: 88 / MODULES / AMS / ARTICLE.PHP? StoryId = 38 # http://gi.2288.org:88/modules/AMS/Artic Le_38.htm shutriterule /modules/ams/topic_(. )/.htm full of /modules/ams/index.php?storytopic= $ 1 REWRITERULE /MODULES/AMS/Archive (.*)-(.* )/.htm $ /Modules/ams/archive.php?year= $ 1&month= $ 200 # ------------------ BookList Rewriterule /Modules/booklists/index.htm / modules / Booklists / index.php shutriterule /modules/bookLists/hit_(. /.htm full / typp?hit= *booklists/rate_(. /.htm full of modules / Modules / BookLists / topten.php? rate = $ 1 shutriterule /modules/bookLists/view(.* )/.htm full of /modules/booklists/viewcat.php?cid=
$ 1 # ------------------- xphpbbi retwriterule /modules/xphpbbbi/index.htm full / typ/xphpbbi/index.php Rewriterule / modules / xphpbbi / viewforum_ (. *) /. htm $ /Modules/xphpbbi/viewforum.php?f= * xphpbbi/viewtopic_(.* )/.htm full / tydules/xphpbbi/viewtopic.php?t= $1 REWRITERULE / MODULES / XPHPBI /viewtopic_post(.*)-( )-(.* )-( )-(.* )/.htm full /modules/xphpbbi/viewtopic.php?t= $1&Start= $ 2&postDays= $ 3&postorder= $ 4 & HIGHLIGHT = $ 5 REWRITERULE /MODULES/Xphpbbbi/viewtopic_o(.*)/.htm#(.*) $ /Modules/xphpbbi/viewtopic.php?p= $ 1# $ # ----------- --------- Newbb Rewriteerule /Modules/newb/index.htm /modules/newbb/index.php riterule /modules/newbb/viewall.htm !/modules/newbb/viewall.php # http: / /GI.2288.org:88/modules/newbb/Viewall.php # http://gi.2288.org:88/modules/newbb/VIEWALL.HTM REWRITERULE /MODULES/NEWBB /SARCH.HTM @ / modules / newbb /Search.php # http://gi.2288.org:88/modules/newbbb/search.php # http://gi.2288.org:88/modules/newbb/search.htm Rewriterule / Modules / Newbb / Forum _ (. *) /. htm $ / m Odules / newbb / viewforum.php? Forum = $ 1 # http://gi.2288.org:88/modules/newbb/viewforum.php?forum=5 # http://gi.2288.org:88/modules/ Newbb / forum_5.htm shutriterule /modules/newbb/viewtopic_id(.* )-( )/.htm full /Modules/newbb/viewtopic.php?topic_id= $ 1&sterum= $ 2 # http://gi.2288.org : 88 / Modules / Newbb / ViewTopic.php? Topic_ID = 111 & forum = 5 # http://gi.2288.org:88/modules/newbb/viewtopic_id111-5.htm Rewriterule /Modules/newbbb/topic_mode_(.* )- (. *) - (. *) /. htm $ /Modules/newb/viewtopic.php?viewMode= $ 1&topic_id= $ 2&Forum= $ 3 # http://gi.2288.org:88/modules/newbb/viewtopic. PHP? ViewMode = flat & Topic_id = 111 & forum =
5 # http://gi.2288.org:88/modules/newbbbbb/topic_mode_flat-111-5.htm Rewriterule /Modules/newbb/newtopic_(.* )-( )-(.* )-(.*) ) - (. *) - (. *) /. htm $ /Modules/newbb/viewforum.php?start= $1&ster €$$2&sortname= $ 3&sortorder= $ 4&sortsince= # http: //gi.2288 .org:? 88 / modules / newbb / viewforum.php start = 0 & forum = 27 & sortname = p.post_time & sortorder = DESC & sortsince = 100 & type = unread # http://gi.2288.org:88/modules/newbb/newtopic_0-27-p .post_time-desc-100-unread.htm shutriterule /modules/newbb/digest_(.* )-( )-(.* )-(.* )/.htm $ /Modules/newbb/viewforum.php?start= $ 1&sterum= $ 2&sortname= $ 3/38 # http://gi.2288.org:88/modules/newbb/viewforum.php?start= 0 & forum = 27 & sortname = p.post_time & sortorder = DESC & sortsince = 100 & type = digest # http://gi.2288.org:88/modules/newbb/digest_0-27-p.post_time-DESC-100-digest.htm RewriteRule / modules / newbb / uReplied (.*)/.htm full. /modules/newbb/viewall.php?type=1 # http://gi.2288.org:88/modules/newbb/viewall.php?type=unReplied # http: / /GI.2288.org:88/modu Les / newbb / unrepliedunreplied.htm shutriterule /modules/newbb/topic_time_(.*)-( )-(.* )-( )-(.* )-() /.htm full of / modules / newbb / viewtopic.php? viewmode = $ 1 & order = $ 2 & topic_id = $ 3 & forum = $ 4 & move = $ 5 & topic_time = $ 6 # http://gi.2288.org:88/modules/newbb/viewtopic.php?viewmode=threaded&order=ASC&topic_id = 111 & forum = 5 & move = prev & topic_time =
1105542643 # http://gi.2288.org:88/modules/newbbbbb/topic_time_threaded-ASC-111-5-PREV-1105542643.htm # ------------------ - IPB REWRITERULE /MODULES/IPBoard/index.htm $ /Modules/ipboard/index.php riterule /modules/ipboard/showtopic_( (.* )-( )-() (./) /.htm! showtopic = $ 1 & s = $ 2 # http://gi.2288.org:88/modules/ipboard/index.php?showtopic=23&s=8d88e79f2ec22ddc5c84d6414bf6c945 # http://gi.2288.org:88/modules/ipboard/showtopic_23 -8d88e79f2ec22ddc5c84d6414bf6c945.htm shutriterule /modules/ipboard/ShowForum_ (.* )-(.* )/.htm full /Modules/ipboard/index.php?showforum= $ 1&s= $2 # http://gi.2288.org: 88 / modules / ipboard / index.php? showforum = 17 & s = 8d88e79f2ec22ddc5c84d6414bf6c945 # http://gi.2288.org:88/modules/ipboard/showforum_17-8d88e79f2ec22ddc5c84d6414bf6c945.htm RewriteRule /modules/ipboard/showforum_(.*)/. HTM $ /MODULES/ipboard/index.php?showforum= $ 1 # http://gi.2288.org:88/modules/ipboard/index.php?showforum=14 # http://gi.2288.org:88 /Modules/ipboard/showforum_14.htm Rewriterule / Mo Dules / ipboard / showtopic _ (. *) /. htm $ /Modules/ipboard/index.php?showtopic=1 # http://gi.2288.org:88/modules/ipboard/index.php?showtopic=17 # http://gi.2288.org:88/modules/ipboard/showtopic_17.htm shutriterule /modules/ipboard/act_(.* )-(.* )/.htm @ /modules/ipboard/index.php?act= $ 1 & C = $ 2 # http://gi.2288.org:88/modules/ipboard/index.php?act=sc&c=4 # http://gi.2288.org:88/modules/ipboard/act_sc-4 .htm shutriterule /modules/ipboard/act-i_(.* )/.htm full of /modules/ipboard/index.php?act= $ 1 # http://gi.2288.org:88/modules/ipboard/index. PHP? ACT =
IDX # http://gi.2288.org:88/modules/ipboard/act-i_idx.htm # ------------------ Digest Rewriterule / Modules / Digest /index.htm ownel /modules/digest/index.php shutriterule /modules/digest/cid_(.* )/.htm full /Modules/digest/index.php?category_id= $1 # http://gi.2288.org : 88 / Modules / Digest / Index.php? Category_ID = 2 # http://gi.2288.org:88/modules/digest/cid_2.htm shutriterule /modules/digest/ud_(.* )-() /.htm @ /modules/digest/index.php?op= $ 1&digest_id= $ 200 # http://gi.2288.org:88/modules/digest/index.php?op=update&digest_id=7 # http: // Gi.2288.org:88/modules/digest/ud_update-7.htm shutriterule /modules/digest/ctid_(.* )/.htm full /Modules/digest/custom.php?category_id= $ 1 # http: // gi .2288.org: 88 / modules / digest / custom.php? Category_id = 2 # http://gi.2288.org:88/modules/digest/ctid_2.htm shutriterule /modules/digest/u-ccid_(.* ) /. htm $ /Modules/digest/index.php?digest_id= $ 1 # http://gi.2288.org:88/modules/digest/index.php?digest_id=10#10& # http: // gi. 2288.org:88/modules/digest/u-ccid_10.htm#10& shutriterule / module ES / DiGEST / U-CID _ (. *) - (. *) /. htm $ /Modules/digest/index.php?op= $ 1&category_id= $$ # http://gi.2288.org:88/modules/ DiGest / index.php? OP = update & category_id = 4 # http://gi.2288.org:88/modules/digest/u-cid_update-4.htm # -------------- ------ wordbook RewriteRule /modules/wordbook/index.htm$ /modules/wordbook/index.php RewriteRule /modules/wordbook/letter.htm$ /modules/wordbook/letter.php RewriteRule / modules / wordbook / category .htm $ /modules/wordbook/category.php shutbook/category_( (.*)/.htm full /modules/Wordbook/category.php?categoryID= $ 1 # http://gi.2288.org:88 /Modules/Wordbook/category.php?categoryID=
1 # http://gi.2288.org:88/modules/Wordbook/category_1.htm Rewriterule /Modules/WordBook/letter_ (.* )/.htm full /modules/Wordbook/Letter.php?init= $1 # http : //gi.2288.org: 88 / Modules / Wordbook / Letter.php? Init = B # http://gi.2288.org:88/modules/Wordbook/Letter_b.htm Rewriterule / Modules / Wordbook / Entry_ ( * Wordbook/ENTRY.PHPRYTRYID = 1 # http://gi.2288.org:88/modules/Wordbook/entry.php?Tryid=111 # http: // gi. 2288.org:88/modules/Wordbook/entry_111.htm # -------------------- WordPress Rewriterule /Modules/WordPress/index.htm full / modules / WordPress / INDEX.PHP REWRITERULE /MODULES/WordPress/index_(.* )/.htm full /Modules/wordpress/index.php?p= $ 1 # http://gi.2288.org:88/modules/wordpress/index.php ? p = 9 # http://gi.2288.org:88/modules/WordPress/index_9.htm shutriterule /modules/.htm full_ /modules/wordpress/index.php?cat= $ 1 # http://gi.2288.org:88/modules/WordPress/index.php?cat=1 # http://gi.2288.org:88/modules/wordpress/cat_1.htm Rewriterule / modules / WordPress /m_(.* )/.htm full Modules / WordPress / INDEX.PHP? M = $ 1 # http://gi.2288.org:88/modules/wordpress/index.php?m=200412 # http://gi.2288.org:88/modules/ WordPress / M_200412.htm Rewriterule /Modules/WordPress/author_(.* )/.htm full /Modules/WordPress/index.php?author= $ 1 # http://gi.2288.org:88/modules/WordPress/index .php? author = 1 # http://gi.2288.org:88/modules/WordPress/author_1.htm # ------------------ Flashgames Rewriterule / modules / flashgames / index.htm $ /modules/flashgames/index.php RewriteRule /modules/flashgames/highscores.htm$ /modules/flashgames/highscores.php RewriteRule /modules/flashgames/hit_(.*)/.htm$ / Modules / Flashgames / Topten.php? Hit = $ 1 # http://gi.2288.org:88/modules/flashgames/topten.php?hit=
1 # http://gi.2288.org:88/modules/flashgames/hit_1.htm shutriterule /modules/flashgames/rate_(.* )/.htm full /modules/flashgames/topten.php?rate= $1 # http : //gi.2288.org: 88 / Modules / FlashGames / Topten.php? rate = 1 # http://gi.2288.org:88/modules/flashgames/rate_1.htm Rewriterule / Modules / Flashgames / CID_ *flashgames/viewcat.php?cid= $ 1 # http://gi.2288.org:88/modules/flashgames/viewcat.php?cid=5 # http: // gi. 2288.org:88/modules/flashgames/cid_5.htm shutriterule /modules/flashgames/lid_(.* )/.htm full /Modules/flashgames/game.php?lid= $ 1 # http://gi.2288.org : 88 / Modules / FlashGames / Game.php? Lid = 15 # http://gi.2288.org:88/modules/flashgames/lid_15.htm # --------------- ----- mylinks RewriteRule /modules/mylinks/index.htm$ /modules/mylinks/index.php RewriteRule /modules/mylinks/submit.htm$ /modules/mylinks/submit.php RewriteRule / modules / mylinks / submit. HTM $ /Modules/mylinks/submit.php shutriterule /modules/mylinks/hit_(.* )/.htm full /Modules/mylinks/topten.php?hit=1 # http://gi.2288.org:88/ Modules / mylinks / topten.php? hit = 1 # http://gi.2288.org:88/modules/mylinks/hit_1.htm shutriterule /modules/mylinks/rate_(.* )/.htm full of / modules / mylinks /topten.php?rate= $1 # http://gi.2288.org:88/modules/mylinks/topten.php?rate=1 # http://gi.2288.org:88/modules/mylinks/rate_1 .htm shutriterule /modules/mylinks/cid_(.* )/.htm full /modules/mylinks/viewcat.php?cid= $ 1 # http://gi.2288.org:88/modules/mylinks/viewcat.php? CID = 5 # http://gi.2288.org:88/modules/mylinks/cid_5.htm shutriterule /modules/mylinks/visit_(.*)-(.* )/.htm Modules / MyLinks / Visit. PHP? CID = $ 1 & LID = $ 2 # http://gi.2288.org:88/modules/mylinks/visit.php?cid=21&lid=
14 # http://gi.2288.org:88/modules/mylinks/visit_21-14.htm # ------------------- XMline Rewriterule / Modules / XMLine /index.htm full / typ/xmline/index.php shutriterule /modules/xmline/cid_(.* )/.htm full of /modules/xmline/index.php?category_id=1 # http://gi.2288.org : 88 / Modules / XMline / Index.php? Category_id = 2 # http://gi.2288.org:88/modules/xmline/cid_2.htm shutriterule /modules/xmline/o-Item_(.* )/.htm $ /Modules/xmline/Item.php?digest_id= $ 1 # http://gi.2288.org:88/modules/xmline/Item.php?digest_id=32 # http://gi.2288.org:88/ Modules / XMline / O-Item_32.htm shutriterule /modules/xmline/d-(.* )-( )- (.* )/.htm full /Modules/Xmline/index.php?op= $ 1&digest_id= $ 2 # http: // Gi.2288.org:88/modules/xmline/index.php?op=update&digest_id=40 # http://gi.2288.org:88/modules/xmline/d-Update-40.htm Rewriterule / Modules / XMLINE /c-cid_(.* )/.htm full /modules/xmline/custom.php?category_id= $ 1 # http://gi.2288.org:88/modules/xmline/custom.php?category_id=7 # http : //gi.2288.org: 88 / Modules / XMline / C-CID_7.htm Rewriterule / Modules / XMLI NE / U-CCID _ (. *) /. htm $ /Modules/xmline/index.php?digest_id= $ 1 # http://gi.2288.org:88/modules/xmline/index.php?digest_id=40# 40 & # http://gi.2288.org:88/modules/xmline/u-cid_40#40.htm shutriterule /modules/xmline/ua-cid_(.htm full of (./.htm full) / Modules / Xmline / index.php? OP = $ 1 & category_id = $ 2 # http://gi.2288.org:88/modules/xmline/ua-cid_update-4.htm # ------------- ------- lykos_syndication riterule /modules/lykos_syndication/index.htm !/Modules/lykos_syndication/index.php # -------------------- Liaise Rewriterule / Modules / Liaise / Index.htm $ /Modules/liaise/index.php # -------------------- Other virtualhost>