php - .htaccess RewriteRule for long URL is not working -


i new it. may doing silly mistakes. in .htaccess have written rewriterule below:

rewriterule ^contactus$ /contact.php [l,b] 

if url http://localhost/contactus working fine. if url http://localhost/countryname/contactus working fine. when url http://localhost/songs/bob+marley+%26+the+wailers/one+love/contactus page not redirecting

please help.

the ^ symbol in beginning of match means should begin matching start of string. means second url (http://localhost/countryname/contactus) should not match either.

if want match urls ending "contactus", remove ^ beginning:

rewriterule contactus$ /contact.php [l,b] 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -