Forum Moderators: coopster

Message Too Old, No Replies

clean urls

got them working but need a little help

         

mroach

4:22 pm on Apr 4, 2005 (gmt 0)

10+ Year Member



I need some help with my little CMS that I have made my self, it's nothing fancy but I hate things left half done.

What I have is a mySql database and a php frontend, I am using mod_rewrite to create static urls

RewriteRule ^article/([a-z0-9]+)-([a-z0-9]+) view.php?clean_url=$1-$2

The code above gives me a url which looks like [mydomainname.co.uk...]

Now this is where I am stuck, I am currently only using two words for the url but how would I have it so I could have a url like :
[mydomainname.co.uk...]

Any help is much appricated

killroy

4:30 pm on Apr 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



RewriteRule ^article/([a-z0-9\-]+) view.php?clean_url=$1

:)

SN

mroach

4:36 pm on Apr 4, 2005 (gmt 0)

10+ Year Member



Amazing.... I was trying all sorts or rewrite options..

Thanks for such a quick respone...

Cheers

coopster

10:33 am on Apr 5, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, mroach.

There is an Apache Forum [webmasterworld.com] here at WebmasterWorld that has loads and loads of information and examples of mod_rewrite. Not that we don't mind helping out over here in PHP as killroy has so graciously demonstrated, mind you, but just wanted to let you know about the Apache Forum too :)