php - htaccess rewrite rule only partially works -


i have basic htaccess rewrite file, unable 1 of rules work when similar previous rule.

my code is;

rewriteengine on  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d  rewriterule ^gallery$ gallery.php rewriterule ^about-us/page-1$ page-1.php rewriterule ^about-us/page-2$ page-2.php rewriterule ^about-us$ about-us.php 

gallery, page-1 , about-us work, page-2 not.

is there way work?

i have tried different order , if about-us put first, neither page-1 or page-2 work

note: redirect redirects page-2 included files (css, js etc) not load

try this:

rewriteengine on  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} /about-us/page-2$  rewriterule .* page-2.php [nc,l]     rewriterule ^gallery$ gallery.php [nc,l] rewriterule ^about-us/page-1$ page-1.php [nc,l] rewriterule ^about-us$ about-us.php [nc,l]  

Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -