php - Trying to remove directory names from application URL -


my badluck i'm ui developer , given task of url rewriting please me.

i've url me /abc/def/ghi/somefile.php?id=1 want somefile?id=1

i have code in .htaccess

options +followsymlinks -multiviews rewriteengine on rewritebase /  rewriterule ^/abc/def/ghi/(.*)$ /$1 [l,nc,r] 

but after uploading htaccess server giving me 404 error after removing /abc/def/ghi/ part.

any appreciated.

rewriterule not receive first slash

rewriterule ^abc/def/ghi/(.*)$ /$1 [l,nc,r]


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -