清理凌乱的URL [重复]

This question already has an answer here:

Lets say we have a URL that looks like this: http://www.onegreatwebadress.com/index.php?sideID=home and we want it to show something like this instead: http://www.onegreatwebadress.com/home

How is it done with mod_rewrite -> apache 2.2?

Here is my .htaccess (placed in the root file of the webserver) : Additionaly, the website im working in is placed in a sub dir: www\onegreatsite

RewriteEngine on
RewriteBase /onegreatwwebadress/
RewriteRule ^sideID([a-zA-Z0-9]+).php$ sideID.php?=$1

</div>

This is done by uploading a file called: .htaccess to your web directory. Apache will read this, and will allow you to manipulate your URL, amongst other things.

A website I have found useful for performing actions and also informative for new users:

http://roshanbh.com.np/2008/03/url-rewriting-examples-htaccess.html

Examples published on this page will help solve your situation.

It seems like your .htaccess is not functioning properly. This could be fixed by changing the Apache configuration. Often these kind of .htaccess problems can be fixed by adding AllowOverride all to the <Directory> section in the Apache configuration file. Here is an example.

<Directory /var/www/>
   AllowOverride all
</Directory>

This will allow the .htaccess file to override any previous stated configurations.