NSA
sudo apt-get thefuckout.tar.gz
- Dec 9, 2011
- 715
- 86
Hello,
So I got .htaccess to forward anything like ?id=1 to /id/1
But now I'm getting "Error 404, Not found.".
Is there something wrong with my .htaccess?
So I got .htaccess to forward anything like ?id=1 to /id/1
But now I'm getting "Error 404, Not found.".
Is there something wrong with my .htaccess?
Code:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
# external redirect from /view.php?id=1 to /view/id/1
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+([^.]+)\.php\?([^=]+)=([^\s&]+) [NC]
RewriteRule ^ /%1/%2/%3? [L,R=301]
# internal forward from /view/id/1 to /view.php?id=1
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ /$1.php?$2=$3 [L,QSA]