我有我的.htaccess
重寫規則有問題(我在這個新的,所以也許這是一件容易的事情)的.htaccess重寫URL以兩個變量
我有一個網址是:
http://www.example.com/film-al-cinema/?titolo=Ghost+in+the+Shell&id=315837
所以我有第一個變量titolo=""
內的電影標題和第二個變量id=""
中的電影ID。
我想要的網址看起來像
http://www.example.com/film-al-cinema/Ghost+in+the+Shell/315837
我試圖改變與此htaccess文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^film-al-cinema/(.*)/([0-9]+)$ film-al-cinema/?titolo=$1&id=$2 [R]
</IfModule>
但這重定向我到一個404頁
編輯
我正在做Wor D按所以/film-al-cinema/
是一個WordPress頁面
EDIT 2
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^film-al-cinema/([^/]+)/(\d+)/?$ /index.php?page_id=21016&titolo=$1&id=$2 [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
我瘦也已經改寫爲電影人,電影規則 –
電影人,電影不是一個目錄,但它是一個WordPress頁面,所以我想有可能的? – alessandroduemetri
如果'film-al-cinema'不是現有的目錄,那麼wordpress如何映射到http://www.websitename.com/film-al-cinema/?...上?或者甚至更好:wordpress'index.php位於哪裏? wordpress安裝的.htaccess中是否有更多規則? –