Hey everyone! Hopefully this is the right place to post this. I'm trying to work on a redirection for a blog-like script, and I figured .htaccess would be the best way. Every user will have their own link such as mywebsite.com/acooluser and rather than make a folder for each user, I'm going to use the rewrite function.
Now I came into a problem on folders that do exist and can be navigated to, so I wanted code that would skip the folders that exist, but if they didn't exist, it would redirect to the profile page and show that person's information.
Here's what I'm using right now:
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*[/]$ /purefm_v2/djs.php?did=$1 [NC,L]
The problem is, the RewriteRule never gets called. It's as if all directories exist because it tries to go to a non-existing one and issues a 404 error. Does anyone know what I missed?