Rewrite different page with .htaccess url rewrite

I’d like to use .htaccess for url rewrite.
In my previous post you have shown me how to do it to the index.php page but now would like to do also for other pages like browser.error.php, etc.
To do so I tried to add the last 2 rows in the .htaccess, but unfortunately if I try the link www.mysite/browser-error/ it doesn’t work – Return me in the index page.

Options +FollowSymLinks
RewriteEngine on

RewriteRule .(css|jpe?g|gif|png|js|ico)$ - [L,NC]
# rule to ignore files and directories from all rewrite rules below
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]

RewriteRule ^(.*)/(.*)/(.*)/?$ index.php?op=$1&idric=$2&sp=$3 [L,QSA,NC]
RewriteRule ^(.*)/(.*)/?$ index.php?op=$1&idric=$2 [L,QSA,NC]
RewriteRule ^(.*)/?$ index.php?op=$1 [L,QSA]

#NEW ADDED ROWS
RewriteRule ^browser-error/(.*)/?$ browser.error.php?r=$1 [L]
RewriteRule ^browser-error/?$ browser.error.php [L]

Where I am doing wrong? How would I go? Thank you


Source: .htaccess

Leave a Reply