I've got no idea how to properly use the .htaccess
file and all the guides and tutorials out there aren't the easiest to understand.
Here is my current code...
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/([^/]+)/([^/]+)/([^/]+)$ productpage.php?productidpage=$1&brand=$2&productname=$3 [L,NC]
I want it to display as www.mysite.com/$1/$2/$3/
whenever productpage.php
is loaded.
Well, actually I want it to display as www.mysite.com/$2/$3
if that's possible.
The productidpage
variable is what is picked up in the code to load the page, $2
and $3
are purely there just to modify the URL.