So I’m writing a web based program, and instead of having a mass of /?p=54&z=42, etc in the URL, I’ve set it up to direct the first “directory” (eg /home/) to be the function, the second “directory” (eg /home/view/) to be the action.
Right now, setting it as localhost/home/ works, setting it to localhost/settings/ also works, but when I change it to localhost/stats/ it tries looking for the file or folder… not redirecting it to a variable to be used in PHP…
I did have a .PHP file sitting there before but removed it 2 days ago. Apache is still trying to find the file that was there. I’ve restarted my computer a dozen times with no luck.
My .htaccess file looks like this:
RewriteRule ^([a-z]+)/([0-9,a-z]+)$ /$1/$2/ [R]
RewriteRule ^([a-z]+)/([0-9,a-z]+)/$ /index.php?function=$1&action=$2 [L]
RewriteRule ^([a-z]+)$ /$1/ [R]
RewriteRule ^([a-z]+)/$ /index.php?function=$1 [L]
What am I doing wrong, and what do I need to do to get this working?
Turns out there was a file called
stats.deadphpin the root directory that was causing the issue. Deleting that cleared it up. 🙂