Forum Moderators: coopster

Message Too Old, No Replies

URL Rewrite -- newbie frustration with rewriterule

URL Rewrites Rewriterule

         

TMRBac

7:41 pm on Nov 29, 2007 (gmt 0)

10+ Year Member



In a nutshell, I'm pulling my hair out trying to get URL rewrites to work. I've never done them before so bear with me.

Here's what I'm trying to do. I have a dynamic URL appearing on the homepage (index.php) of my site:

http://www.example.com/news.php?id=23

I want the URL to rewrite to look like this:

http://www.example.com/news/dynamicarticletitle/23

The dynamicarticlename is pulling from the database along with the article id number.

I've tried every which way using Rewriterule to get this to work but haven't been able to. I got it working once with just the id number and not the article name, but then the rest of the images on the site had their paths rewritten and were broken.

Any advice would be appreciated. I suspect this is a 10 second fix. Thanks!

[edited by: eelixduppy at 7:57 pm (utc) on Nov. 29, 2007]
[edit reason] switched to example.com [/edit]

phranque

8:17 pm on Nov 29, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], TMRBac!

you might get better answers in the apache web server forum.

you should check out this previous thread:
[webmasterworld.com...]
you could see if your server log files have any clues.
post the rewriterule you tried, the url you tried, what you expected to see and the response you got.

TMRBac

8:31 pm on Nov 29, 2007 (gmt 0)

10+ Year Member



Thanks, will do!

phranque

8:33 pm on Nov 29, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



i meant to include the link to the apache web server forum [webmasterworld.com]