M
M
Max Darkleviathan2021-03-01 18:31:14
htaccess
Max Darkleviathan, 2021-03-01 18:31:14

How to remove .php from htaccess?

Now the link to the page is mysite.com/ind.php?pg=mypage&n=12 You
need to get something like mysite.com/ind?pg=mypage&n=12

That is, to remove .php from the links

Tried

RewriteEngine on
RewriteRule ^ind?pg=mypage$ ind.php?pg=mypage


But when you enter & and the variable n=12 for example, the page throws an error.
Perhaps I'm missing something, and it's easier to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-03-01
@darkleviathan

RewriteRule ^ind$ ind.php [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question