Creating simple URL's (.htaccess - mod_rewrite)
I have this structure for my navigation index.php?v=p开发者_如何学运维age
I am looking to convert it to: www.domain.com/page/ - using mod_rewrite..any ideas on that? I read through some tuts and examples, but couldnt get it working right.
Here's some examples.
RewriteEngine on
# www.domain.com/page/example changed to index.php?page=example
RewriteRule ^page/([^/\.]+)/?$ index.php?page=$1 [L]
# www.domain.com/example changed to index.php?v=example
RewriteRule ^example(/)?$ index.php?v=example [L]
The second rule sounds like what you're after.
精彩评论