0
删除号码这是我的.htaccess的代码如何从URL中的.htaccess
RewriteEngine on
RewriteRule ^play/([0-9]+)_(.+)$ file.php?f=$1&name=$2 [L]
我的链接是
sitename.com/play/399_Beauty_Barbie_hair
但是,我想它是这样
sitename.com/play/Beauty_Barbie_hair
我怎样才能的政绩这是吗?
没有工作 RewriteEngine叙述上 RewriteBase/ 重写规则^游戏/([0-9] +)_ (。+)$ file.php?f = $ 1&name = $ 2 [L,QSA] RewriteCond%{REQUEST_FILENAME}!-f RewriteRule^games /(.+)$ file.php?f = $ 1&name = $ 2 [ L,QSA] 函数文件($ id,$ title){ \t \t if($ this-> search_engine_friendly){ \t \t \t $ title = str_replace($ this-> replace,$ this-> replacement,$ title); \t \t \t return $ this-> site_url。'/'。 $ this-> file_url。'/'。 $ id。'_'。 $ title; \t \t} else { \t \t \t return $ this-> site_url。'/ file.php?f ='。 $ ID; \t \t} \t} –
user3418508
请勿在此粘贴代码。解释什么不起作用?你有404吗?哪个网址导致问题,尽可能多的关于这个问题的细节会更好。 – anubhava
感谢您的回复 我没有得到404,但没有发生任何事情,网址仍然带有这样的数字sitename.com/play/399_Beauty_Barbie_hair,你能帮忙吗? – user3418508