I have a problem with my rewrite rule .htaccess(I'm new to this, so maybe it's easy)
I have a url that:
http://www.example.com/film-al-cinema/?titolo=Ghost+in+the+Shell&id=315837
So, I have the movie name inside the first variable titolo=""and the movie id in the second variable id="".
I want the url to look like
http:
I tried to modify the htaccess file as follows:
<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>
but it redirects me to page 404
EDIT
I am working on Wordpress, therefore it /film-al-cinema/is a Wordpress page
EDIT 2
<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>
source
share