I have a form that redirects users to a url depending on the word they enter in a form. 1. A user enters 'banana' in the form and hits submit 2. They're taken to domain.com/banana in their browser 3. Which is rewritten to domain.com/index.php?s=banana by htacess The problem is when somebody enters a word with a dot, like 'banana.apple'. The user is redirected to domain.com/banana.apple and gets a 404. If I manually enter domain.com/index.php?s=banana.apple then everything works fine. How can I fix this? Options +FollowSymLinks RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^([^/.]+)/?$ index.php?s=$1 [QSA,L] Code (markup):
Options +FollowSymLinks RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{REQUEST_URI} !\.(html?|php\d?)$ RewriteRule ^([^/]+)/?$ index.php?s=$1 [QSA,L] Code (markup):