First of all, make sure your apache have it installed.
Then this sudo ln-s / etc/apache2/mods-available/rewrite.load / etc/apache2/mods-enabled/rewrite.load make rewrite
Module load module. Here involves a relationship between available and enable the former is available, the latter has already started loading the. ok?
My hands have a website, in the apache root directory / var / www folder under a baituan, this time in baituan folder create a new document. Htaccess, which fill in the content
RewriteBase / baituan /
RewriteRule ^ pic / (\ d )+/?& pic.php? A = $ 1
RewriteRule ^ club /? $ Club.php? A = index
RewriteRule ^ club / register /? $ Club.php? A = register
RewriteRule ^ club / login /? $ Club.php? A = login
RewriteRule ^ club / (\ w )+/?$ club.php? A = $ 1 & b = home
RewriteRule ^ club / (\ w) + / (\ w )+/?$ club.php? A = $ 1 & b = $ 2
RewriteRule ^ club / (\ w) + / (\ w) + / (\ w )+/?$ club.php? A = $ 1 & b = $ 2 & c = $ 3
RewriteRule ^ actv /? $ Actv.php? A = index
RewriteRule ^ actv / (\ w) + / create /? $ Actv.php? A = $ 1 & b = create
RewriteRule ^ actv / (\ w) + / (\ w )+/?$ actv.php? A = $ 1 & b = $ 2 & c = home
RewriteRule ^ actv / (\ w) + / (\ w) + / (\ w )+/?$ actv.php? A = $ 1 & b = $ 2 & c = $ 3
Then I intend to visit a man named localhost / baituan / club / register page, it did forward to, but that get parameter is a = register is not transmitted in the past. I checked for a long time, know what to do. Later, see a post on the Internet.
Found a solution. Here the design issue of a multiview
The effect of
MultiViews is as follows: if the server receives a request for
MultiViews enabled, and
/some/dir/foo does not exist, then the server reads the directory looking for files named foo .*, and effectively fakes up a type map which names all those files, assigning them the same media types and content-encodings it would have if the client had asked for one of them by name. It then chooses the best match to the client's requirements.
Here is an apache negotiation problem.
For example, I create a test.html under baituan
Then lcoalhost / baituan / test will automatically request to test.html, this is the multiview. As to why this problem occurs here, and I do not know.
Now sudo gedit / etc/apache2/sites-enabled/000-default
Find here written
Options Indexes FollowSymLinks MultiViews
Determined to MultiViews removed, restart apache, problem-solving.