写个规则就行了。
打开网站根目录,新建一个.htaccess文件:
[user@PathToWebRoot]>$touch .htaccess
[user@PathToWebRoot]>$chmod 766 .htaccess
编辑.htaccess文件:
[user@PathToWebRoot]>$vim .htaccess
按Apache用户指南的重写规则编辑重写模块。
RewriteEngine On
RewriteBase /wordpress/
RewriteRule [在这里写规则]
至于规则怎么写,就看你的需要了。
用 .htaccess做
这个是 xiaodi博客(百度一下排在第一个) 的.htaccess内容:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]
ErrorDocument 404 /index.php
你可以研究下。
估计这个效果你满足了。。