.htaccess - What's wrong with my RewriteRule? It seems ok, but it doesn't work -


i have rewrite rule on webpage.

rewriteengine on  rewriterule ^(.*) index.php?p=$1 [l] 

i want work rewrites urls this:

http://example.com           -> index.php http://example.com/home      -> index.php?p=home http://example.com/lol       -> index.php?p=lol 

but when use following php code inside index.php

print_r($_get) 

it gives this:

array ( [p] => index.php ) 

it gives same results in urls (i tried these: http://example.com, http://example.com/, http://example.com/about, http://example.com/about/

can me debig this?

i got figured out:

the correct code this:

rewriteengine on rewriterule ^([^.]+)/?$ index.php?p=$1  [nc,l] 

sorry question.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -