我知道还有其他帖子问同样的问题,但是我似乎无法使它们正常工作。
用户输入时
http://mywebsite.com/msdns/[letters, numbers, and symbols here]
我需要它去我的页面:
http://mywebsite.com/msdns/index.php?q=[letters, numbers, and symbols here]
到目前为止,我的.htaccess文件中有这个文件(与index.php位于同一文件夹中):
RewriteEngine On
RewriteRule ^/(.*)/$ /index.php?q=$1
但是,这不起作用。有什么办法吗?
预先谢谢你,拍拍
将此规则放在您的/msdns/.htaccess
:
RewriteEngine On
RewriteBase /msdns/
RewriteRule ^((?!index\.php).+)$ index.php?q=$1 [L,QSA]
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句