Reputation: 357
I want to change my URL from
http://website.com/movie.php?id=69
to
My htaccess file is completely blank, and I don't know if i need to modify my PHP code. I've never dealt with htaccess and would prefer having direct assistance instead of some tutorial.
Upvotes: 0
Views: 52
Reputation: 785156
You can use this code in your DOCUMENT_ROOT/.htaccess
file:
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+movie\.php\?id=([^\s&]+) [NC]
RewriteRule ^ movie/%1? [R=302,L]
RewriteRule ^movie/(\d+)/?$ movie.php?id=$1 [L,QSA,NC]
Upvotes: 1