1
1
15x032432018-11-30 22:03:15
htaccess
15x03243, 2018-11-30 22:03:15

How to fix .htaccess issue?

Greetings, the other day I had to create a cnc using .htaccess and php.
The goal was that when a person visits example.com/profile/1 , they should be redirected to example.com/profile/index.php?id=1.
But there is a problem: if I go to example.com/admin, then I am redirected to example.com/admin/?id=admin.
What to do?
.htaccess code:

RewriteEngine On
RewriteRule ^([A-Za-z0-9-/]+)$ profile/index.php?id=$1 [L]

Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2018-11-30
@KenKup

RewriteEngine On
RewriteRule ^profile/([0-9]+)$ /profile/index.php?id=$1 [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question