Hello everybody I want help for apache mode rewrite cause I am novice and. Really I'm not sure steps to make this done.

here's mys problem

I've some web addresses that I wish to edit all of them with apache

1- mywebsite/category.php ---> I would like that hyperlink to stay enjoy it is mywebsite/category.php?sid=categoryname ---> mywebsite/category/categoryname.html

2- mywebsite/news.php --> No modification mywebsite/news.php?view=1(2,3,4,5....etc id within the database) ---> mywebsite/news/subject header.html subject header may be the title from the news that'll be known as in the database through the id

Well Thanks everybody for you personally help cause really I'm not sure how to get this done. All things i can perform is produce a htaccess file ^^.

Inside your .htaccess file put:

RewriteEngine On

RewriteRule ^/category.php?sid=([^&]+) /category/$1.html [L,R]