P
P
Programmir2018-08-07 11:59:28
htaccess
Programmir, 2018-08-07 11:59:28

How to make CNC?

Please tell me how to remove the .php extension from the url: site.ru/page.php => site.ru/page
And convert the page with id: site.ru/page.php?id=100 => site.ru/page /100

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrej Sharapov, 2018-08-07
@Madeas

Look here https ://github.com/madeas/analytics/blob/master/.h...

# убираем .html веб страниц
    RewriteCond %{REQUEST_URI} !\.[a-zA-Z0-9]{2,4}
    RewriteCond %{REQUEST_URI} !/$
    RewriteRule ^(.*)$ $1.html

just replace html with php. Should work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question