apache - htaccess to remove the GET params, but still pass the value -


i have set redirect www.foo.***/2 www.foo.***/index.php?id=2, trying redirect without displaying url.

i want url stay www.foo.***/2 atually deliver www.foo.***/index.php?id=2

my htaccess file:

options +followsymlinks rewriteengine on rewriterule ^$ h**p://server/~user/folder/sub/index.php [l] errordocument 404 h**p://server/~user/folder/sub/error/ errordocument 500 h**p://server/~user/folder/sub/server/ rewriterule ^(error)/([0-9a-za-z+]+)?$ h**p://server/~user/folder/sub/index.php?action=error [l,nc] rewriterule ^(server)/([0-9a-za-z+]+)?$ h**p://server/~user/folder/sub/index.php?action=server [l,nc] rewriterule ^([0-9a-za-z+]+)?$ h**p://server/~user/folder/sub/index.php?id=$1 [l,nc] 

any great thanks!

bo huttinger

thanks awesome spamz protectionz, subsituted stars letters in post

it 'same domain' issue. if call location on same server, doesn't rewrite url in bar

solution: instead of using:

h**p://server/~user/folder/sub/index.php?id=$1 [l,nc]  

use this:

/home/~user/folder/sub/index.php?id=$1 [l,nc] 

hope helps!


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -