Good Resources For Example Rules

https://gist.github.com/ScottPhillips/1721489

Before the rules


Options +FollowSymLinks
RewriteEngine On
RewriteBase /

No Parameters Example


RewriteRule ^groups$ groups.php [L]

1 Parameter Example

RewriteRule ^flips/([^/]*)$ flips.php?fid=$1 [L]
Converts this URL format:
http://www.mydomain.com/flips/996803385327
To this actual php page
http://www.mydomain.com/flips.php?fid=996803385327

 

2 Parameter Example

RewriteRule ^flips/([^/]*)/([^/]*)$ flips.php?fid=$1&valueb=$2 [L]
Converts this URL format:
http://www.mydomain.com/flips/996803385327/hello
To this actual php page
http://www.mydomain.com/flips.php?fid=996803385327&valueb=hello

 

Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published.