0

i have found a solution here, which I am looking for

Creating dynamic URLs in htaccess

so basically I modified the given htaccess code (following code is from solution)

RewriteRule ^products/([A-Za-z0-9-])/?$ /view.php?mode=prod&title=$1

I changed it to fit my needs to

RewriteRule ^blog/([A-Za-z0-9-])/?$ /blog.php?id=$1

but when I visit the url localhost/blog/1 it gives me 404 Error, that's the only line in my .htaccess file, what I am doing wrong?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Max
  • 23
  • 8

1 Answers1

0

You say that's the only line in your .htaccess, don't you have this one too (just before yours) ?

RewriteEngine On

you .htaccess should contain at least :

RewriteEngine On
RewriteRule ^blog/([A-Za-z0-9-])/?$ /blog.php?id=$1
Oussama Jilal
  • 7,669
  • 2
  • 30
  • 53
  • Thanks Yazmat for the reply, I forgot to mentioned that I tried that but I get Internal Server Error.. – Max Aug 09 '12 at 01:14