Hello there, I have a URL: http://domain.com/aboutme.php?page=resume I would like to use a rewrite rule to make this URL look like the following: http://domain.com/resume I've tried a few things, but can't seem to get a working solution. Any help is appreciated. Thanks, Kyle
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^resume$ aboutme.php?page=resume [L] Only for that one page.
How would one do it for an entire site? Say, I want: index.php?page=aboutme to be re-written as: /aboutme and: index.php?page=contact to be re-written as: /contact But there would be new pages added constantly? Is there a way to make it dynamic so that you don't have to change the htaccess file every time you add a new page?
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^([^.]+)$ index.php?page=$1 [L] If you have anything on the site that's not from that script, they won't work. Images might go wacko!
hello. i have a similar problem. i want to rewrite let's say domain.com/somepage.html to domain.com/somepage/ i know about nothing about apache so bare with me please. i must put the code into a .htaccess file right ? king Nintendo, care to give a helping hand ? thank you
Make a directory and place the file there as index.html. Mod_rewrites only good for turning dynamic URLs in to static.