1

I would like to add friendly URL's to my website. But I have one problem. I've never used .htaccess.

My link:

https://example.com/index.php?page=users

I would like to have an URL like this:

https://example.com/page/users 

OR

https://example.com/users 

Is there anyone who can help me?

serenesat
  • 4,611
  • 10
  • 37
  • 53
Cornest
  • 269
  • 1
  • 15

1 Answers1

2

Problem is solved with:

.htaccess:

RewriteEngine On
RewriteRule ^([^/\.]+)/?$ index.php?page=$1

So it is very simple.

Cornest
  • 269
  • 1
  • 15