apache mod_rewrite making permanent url problem
Posted
by Yc Zhang
on Stack Overflow
See other posts from Stack Overflow
or by Yc Zhang
Published on 2010-05-05T17:39:33Z
Indexed on
2010/05/05
17:48 UTC
Read the original article
Hit count: 157
apache
|mod-rewrite
In file .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^\/*get_post\/(.*)$ get_post.php?slug=$0 [L]
</IfModule>
If I type http://example.com/get_post/abcde, I get an empty array of $_GET variable.
How can I achieve the effect like this: http://example.com/get_post?slug=abcde
© Stack Overflow or respective owner