0
votes

I developed a Joomla website which is like a directory. People have their profile in the site and I created a component called com_profile to display their profile when passing the id. So for the following URL it is displaying the profile now.

http:///index.php?option=com_profile&id=100

I need to change the url so when a user type like this "http:///service_providers/100" it will show the profile.

How can I do this? I tried different ways in htaccess nothing helped. :(

1

1 Answers

0
votes

Add this to your apache configuration or htaccess file:

RewriteEngine On
RewriteBase /
RewriteRule ^service_providers/([a-zA-Z0-9-z\-]+)$ index.php?option=com_profile&id=$1

Make sure that modrewrite is enabled. If it's not, enable it via cli by typing a2en modrewrite