L
L
L1MO2022-02-24 21:55:23
PHP
L1MO, 2022-02-24 21:55:23

How to remove view.php?= from link?

I'm not strong in .htaccess and even tried to create rewrite in generators, but in the end my localhost gave 500 internal error, so I went here.

There is http://localhost/view.php?={page_name }

How to remove view.php?=
Leaving {page_name} ie = http://localhost/{page_name }

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FanatPHP, 2022-02-24
@FanatPHP

.htaccess doesn't remove anything from links

V
Viktor Taran, 2022-02-25
@shambler81

RewriteEngine On
RewriteCond %{QUERY_STRING} (?:^|&)\=(.+)(?:$|&)
RewriteRule ^view\.php$ /%1? [L,R=301]

but you most likely need a cnc

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question