4
# php_value session.cookie_domain .rhr.fm
# Enable Rewrite Engine
RewriteEngine on
#Create friendly URL
RewriteRule ^(data|cache)($|/) - [L]
RewriteRule ^([^/]+) index.php?page=$1 [L]
你好再次Stackoverflow!Htaccess重写目录到文件
我想重定向的URL搜索引擎优化我的网站上,这
www.example.com/ 约
www.example.com/?page= 约
和
www.example.com/ 约/
www.example.com?page= 约
但迪尔斯data
和cache
得到排除,使
WWW .example.com/data/js/page.js
确实不重定向到
www.example.com/?page=data/js/page.js
我试过上面的代码,但没有制定出 - 八方通$_GET['page']
转储index.php
。
你能帮我吗?
在此先感谢!
非常有用,感谢您了解'!-f'! – Thew
@anubhava当我在wordpress环境中尝试这样做时,关于数据和高速缓存目录的第一条规则不需要。有任何想法吗? – zoltar
对于wordpress,您将需要使用WP重写API而不是这些规则。 – anubhava