-1

user request example URL

http://example.com/test

instead error 404

redirect to URL

http://example.com/index.php?test

Sorry for poor English

1 Answers1

0

You can use in your .htaccess:

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ /index.php?$1 [L,QSA]

For true redirect, and not only rewrite, use [R=301,L,QSA] Flags

Croises
  • 18,570
  • 4
  • 30
  • 47