RewriteCond with negative conditions
snippet in htaccess

RewriteCond with negative conditions

user4431

RewriteCond %{QUERY_STRING} !(p=.*)$ 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]*)/?$ /index.php?p=$1