Hi,
Basically I have the following in my .htaccess file in the root of my site:
Options -Indexes
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?route=$1 [L,QSA]
</IfModule>
In my PHP script when I use $_GET['route'] I get the following error:
Notice: Undefined index: route
I don't understand why this isn't working? I've used this code in the past on a previous website for friendly URLs and the PHP script got the GET request value fine, but it seems to be playing up now :/
When I do it manually like http://localhost/index.php?route=hmm the error goes away and I can get the value of $_GET['route']
What am I doing wrong? Ask if you need any additional information! Thanks for reading.