Mattimat Mattimat - 1 month ago 9
Apache Configuration Question

.htaccess mod_rewrite 404 not found

My url is now

mysite.com/steam/g?appid=730


What I want is:
mysite.com/steam/directory/730


Here is what I have so far:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/directory/(.*)$ /steam/g.php?appid=$1 [L,QSA,NC]


Now this will only give me a 404 not found. I believe mod_rewrite is enabled as I can rewrite everything to https and remove the .php .html etc. I'm using a web host.

Any idea what could be wrong?

Dom Dom
Answer

I think you want

RewriteRule ^steam/directory/(.*)$ /steam/g.php?appid=$1 [L,QSA,NC]