I need some help about mod_rewrite,
this is my wordpress address:
http://localhost/my_v2010/restaurants?m=display_Add
base_url: http://localhost/my_v2010/
post_name:restaurant
query string:?m=display_Add
I would like to use rewrite mode, let user just type
http://localhost/my_v2010/restaurants/display_Add
any clue how to write in .htaccess?
I tried
RewriteEngine On
RewriteBase /my_v2010/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /my_v2010/index.php [L]
RewriteRule ^restaurants/([^/]+)/?$ restaurants?m=$1 [L]
but no luck, it didn’t show what
http://localhost/my_v2010/restaurants?m=display_Add
had shown. So I need your guys help. Thanks a lot!
Force the custom URL redirection back to the browser so WordPress can understand it:
That will rewrite the request to the expected format and then come through again, piping it through the index.php page for WordPress.