1

I am trying to make my URLs SEO friendly. The current URLs example is http://example.com/details.php?recordID=35791

I would like it to display the 'Name Of Event' in the URL rather than 'details.php?recordID=35791' from a MYSQL database

I have renamed the title by using '?php echo $row_rsd1['Name Of Event'];' in the php page already so the tab is showing correct.

I have too many records to manually rename.

Giacomo1968
  • 25,759
  • 11
  • 71
  • 103

1 Answers1

0

You can make like it.

www.example.com/event-detail-147854-group-meeting.php

here 147854 is record ID and group meeting is title of event.

you can convert title into lower case and spaces replacing by dashes.

Then map in .htaccess file.

RewriteRule ^event-detail-([0-9]+)-([a-zA-Z0-9_\-+]+).php event-detail.php?id=$1&title=$2
Naveed Ramzan
  • 3,565
  • 3
  • 25
  • 30