View Full Version : Static urls

04-05-2005, 12:43 PM
I've used blogs: WordPress, b2evolution on Apache. These use permalinks/static urls. I guess they fetch urls from database and write rewrite rules into .htaccess files using PHP.
My request from the experts here, is to show few examples to make urls static using .htaccess file.?Once, we've the key concepts, we can manipulte .htaccess file using PHP, to make our Web pages, SE friendly. This is exactly, the blogs, I've mentioned do.

Apache documentation for mod_rewrite() is dry, and I'll be very glad, if you provide me few examples here.( I'll test myself )

Please provide few nice urls for learning regular expressions and Apache mod_rewrite() module functions.

Permalinks :confused:

Special thanks.

04-07-2005, 01:33 PM
You don't create links individually, what you do is create a pattern that mod_rewrite can match

RewriteEngine On
RewriteRule ^blog/(.*)/(.*)/(.*)/ /index.php?postid=$1&something=$2&other=$3

So if you typed in http://www.mydomain.com/blog/23/this_is_something/this_is_other/

then it will look like http://www.mydomain.com/index.php?postid=23&something=this_is_something&other=this_is_other to the server