Free mobile phone's stuffs - Loans - Property Search - Loans - Debt Help

PDA

View Full Version : Am i doing any mistake on URL rewriting?


kks_krishna
Nov 1st 2007, 6:48 am
HI, Here is my rules:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^([a-zA-Z0-9]*)/$ author.php?author=$1 [L,NC]

the requirement is i have the url like this:
www.sitename.com/authors/author.php?author='AuthorName'

I want the url like this:

www.sitename.com/authors/AuthorName

Is there any mistake on the above rules. I have the .htaccess in the same directory.

Nintendo
Nov 1st 2007, 10:35 am
Options +FollowSymLinks +Indexes
RewriteEngine on
RewriteBase /
RewriteRule ^authors/([^.]+)\.html$ authors/author.php?author=$1 [L]

if you don't have .html, it'll just kill the script.