Forum Moderators: phranque

Message Too Old, No Replies

.htaccess URL rewrite

         

never_rain

3:40 pm on Aug 15, 2006 (gmt 0)

10+ Year Member



I have an article based website. articles are added in the database and titles are listed on one page and once, clicked on any title, it will take to article detail page to show the details of that page. the URL looks like this.

[mydomain.com...] Tips

I would like this to be translated to

[mydomain.com...]

this means, every title coming dynamically from database should be translated to the file name. I am trying very hard to do this but due to very limited knowledge about .htaccess and its dirctives, I am unable to do this. I tried using this code in .htaccess file

RewriteCond %{REQUEST_URI}!^/articleDetails\.php
RewriteRule ^([^/]+)/? articleDetails.php?id=$1 [L]

But the server gives internal server error 500

I would really appreciate if I can get some basic knowledge about how to dug into it and start with this kinda process.

Thanks in advance.

Faisal

jdMorgan

5:16 pm on Aug 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This thread from our Apache forum library should get you started quickly: Changing Dynamic URLs to Static URLs [webmasterworld.com]

Jim