mod_rewrite problem

Ok, right now, I have the following:

RewriteRule ^articles/([0-9]+)/?$ /index.php?page=articles&id=$1

Works just fine, but the problem is, all my HREF's come out to:

http://www.domain.com/?page=blah

It should be:

http://www.domain.com/index.php?page=blah

They are missing the actual "index.php" in HREF's, is there a way to change the pattern to include that?
drakkarnoirAsked:
Who is Participating?
 
mrielfCommented:
Use this if you want to convert http://yoursite.com/articles/123/ to http://yoursite.com/index.php?page=articles&id=123

RewriteEngine on
RewriteRule ^/articles/([0-9]+)/$ /index.php?page=articles$id=$1 [R]

use [R] to tell to browser that document moved...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.