I always suck at .htaccess I'm trying to have a website where all requests go though index.php but i'd like the URL to be like www.sample.com/home. effectively that url would load www.sample.com/index.php?page=home
Right now I have
RewriteRule ^/([a-z0-9-]+) /index.php?page=$1 [NC,PT,L]
Which doesnt work even though regexr test shows it should. I temporarily changed it to r=301 so i could see the redirect and noticed that www.sample.com/home is redirecting to www.sample.com/index.php?page=/index.php :(
Any thoughts?
Note I've been searching for this for a while and I can't find a solution that actually works. It's not like this was my first stop.