If rewrite url with .htaccess, all INSERT query with php is performed twice (unwanted duplication)
My .htaccess:
Additionally you can set a primary or unique key in your SQL table (for example, 'title'). That alone would prevent any duplicate entries.