На самом деле я хочу запустить ~name/how вместо ~name/how.php.
Я внес следующие изменения в .htaccess:
# If the requested URI does not contain a period in the final path-part
RewriteCond %{REQUEST_URI} !(.[^./]+)$
# and if it does not exist as a directory
RewriteCond %{REQUEST_fileNAME} !-d
# and if it does not exist as a file
RewriteCond %{REQUEST_fileNAME} !-f
# then add .html to get the actual filename
RewriteRule (.*) $1.php [L]
Но он будет работать как:
~name/~name/how
И при каждом нажатии на ссылку она будет добавляться ~name в URL ex. http://ip/~name/~name/~name/serach.
Можете ли вы сказать мне, что не так в .htaccess?