Jump to content

Redirect Dynamic Pages i.e. /index.php?id=45 to /page/45


simm

Recommended Posts

Yes, I keep searching everywhere here on this forum and all over the net but I can't seem to get this code to work:

 

RewriteRule ^/calendar/detail\.php?id=([0-9]+)$ /course/$1  [NC,L]

 

I need www.domain.com/calendar/detail.php?id=80 to redirect to www.domain.com/course/80.  In the future, more of those "id's" will be changed to words in the database to improve SEO (for instance: id?=this-is-the-course-title).  But all I want is something like /course/this-is-the-course-title/, not /calendar/detail.php?id=this-is-the-course-title/.

 

So, how can I get that dynamic page to display the static page AND redirect old pages (i.e. calendar/detail.php?id=80) to their new locations (i.e. course/this-is-the-new-course-title/)?

 

Greatly appreciate the help as I'm been at this for many hours.  :-\

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.