I just wanted that when this is inserted in the URL:
http://website.com/pelicula/0221889/
http://website.com/pelicula/0221889/posters/
It really goes to this (in background):
http://website.com/index.php?ctrl=pelicula&id=0160399
http://website.com/index.php?ctrl=pelicula&id=0160399&tab=posters
So I put this in my .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/([^/]+)/([^/]+)/?([^/]*)/?$ index.php?ctrl=$1&id=$2&tab=$3 [QSA,L]
</IfModule>
But it was not working in my web host so I asked for help from their support team and this was their response:
<IfModule mod_rewrite.c>
RewriteEngine On
# If subdomain www exists, remove it first
#RewriteCond %{HTTP_HOST} ^www.([^.]+.[^.]+)$ [NC]
#RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# If requested resource does not exist as a file
RewriteCond %{REQUEST_FILENAME} !-f
# and does not end with a period followed by a filetype
RewriteCond %{REQUEST_URI} !..+$
# and does not end with a slash
RewriteCond %{REQUEST_URI} !/$
# then add a trailing slash and redirect
RewriteRule (.*) $1/ [R=301,L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Obviously its not working as desired so I just want to know how to fix this!!! I don't know nothing about mod_rewrite and I really need this to work perfectly... I'm going mad I don't know where is the problem.. please help!