我在域名目录的根目录下安装了SMF,并使用门户作为网站的前端。
Portal = Home [mydomain.com] SMF = Forum [mydomain.com/forum/]
门户创建的自定义页面看起来像"index.php?page = page3457"。
我想知道是否有可能重写自定义页面的创建,随着论坛的网址使用漂亮的网址国防部为SMF。
这是我的. htaccess文件:
# PRETTYURLS MOD BEGINS
# Pretty URLs SEO Pro mod
# https://www.smfhacks.com/prettyurls-seo-pro.php
# .htaccess file generated automatically on: December 29, 2022, 5:13
RewriteEngine on
RewriteBase /
# Rules for: actions
RewriteRule ^(agreement|acceptagreement|activate|admin|announce|attachapprove|buddy|calendar)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(clock|coppa|credits|deletemsg|dlattach|editpoll|editpoll2|findmember)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(groups|help|helpadmin|jsmodify|jsoption|likes|lock|lockvoting)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(login|login2|logintfa|logout|markasread|mergetopics|mlist|moderate)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(modifycat|movetopic|movetopic2|notifyannouncements|notifyboard|notifytopic|pm|post)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(post2|printpage|profile|quotefast|quickmod|quickmod2|recent|reminder)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(removepoll|removetopic2|reporttm|requestmembers|restoretopic|search|search2|sendactivation)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(signup|signup2|sitemaps|prettyurls|smstats|suggest|splittopics|stats)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(sticky|theme|trackip|about:unknown|unread|unreadreplies|uploadAttach|verificationcode)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(viewprofile|vote|viewquery|viewsmfile|who|\.xml|xmlhttp|forum)/?$ ./index.php?pretty;action=$1 [L,QSA]
# Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2 [L,QSA]
# Rules for: topics
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]
# PRETTYURLS MOD ENDS
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php80” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php80 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
有没有可能为自定义页面创建更友好的URL,并将"论坛"扩展名改为"社区"?
我见过类似的问题被问到,得到了回答,但我的知识有限。
1条答案
按热度按时间m4pnthwp1#
美女模组结束
重写规则^([a-zA-Z0 - 9-]+)$索引. php?页面=第3457页= $1重写规则^([a-zA-Z0 - 9-]+)/$索引. php?页面=第3457页= $1
这使得URL:/页码/第3457页/
而不是:/index. php?页面=第3457页
问题是:是否可以更改它,使其删除第一个/page/并使用标题代替?
所以,
/网址/
不是
/页面/网址/