I've been trying to rewrite the following URL:
to:
This is what I came up with after researching:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain.domain.com$ [NC]
RewriteRule ^pages/([^/]*).html$ /index.php?id=$1 [L,R=301]
But that didn't work, I ended up on a 404 error page. My .htaccess file is stored in the root of my website (not the subdomain folder), if that is any help.
How could I get this to work?
Thanks,
Daviga404