php - URL Rewrite keeps returning 404 Error -


i've created .htaccess file url rewrite, , tested using http://htaccess.madewithlove.be/ , says url rewrite correct, when testing page keeps giving me 404 error.

here .htaccess:

rewriteengine on rewritebase /  rewritecond %{request_filename} !-f rewriterule ^article/(.*)$ /article/index.php?id=$1  

the url rewrite need following:

http://www.mydomain.com/article/test  // redirect to:  http://www.mydomain.com/article/index.php?k=test 

can tell me messing up? thank you!

first, make sure file exists named /article/index.php , give try:

rewriteengine on rewritebase / # condition: requested file non-existent rewritecond %{request_filename} !-f rewriterule ^article/(.*)$ /article/index.php?id=$1 [l,r=301] 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -