Reputation: 267
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?
Upvotes: 1
Views: 894
Reputation: 3080
I think you want
RewriteRule ^steam/directory/(.*)$ /steam/g.php?appid=$1 [L,QSA,NC]
Upvotes: 2
Reputation: 1292
Assuming your original URL was: http://example.com/steam/g.php?appid=730
I think the following should get you the format you want.
RewriteRule ^steam/directory/([^/]*)$ /steam/g.php?appid=$1 [L,QSA,NC]
Upvotes: 3