Problem with friendly url

Asked

Viewed 601 times

2

I am facing problems with friendly url on my website.

My requests loop if I do this:

RewriteEngine On
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ sessao.php

If I do this, I don’t fall in the loop, but my request doesn’t go through my.php session:

RewriteEngine On
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ sessao.php

However something strange happens to my server, even without the . htaccess and without the rewriter module of active apache, if I call meudominio.com.br/page it will search first page.html if it does not find it will fetch page.php.

I believe the errors are selected. I use apache 2.22, PHP 5.4.9 on Ubuntu 12.04 and 13.04(I tested both dist and gives the same problem) in Cloud Digitalocean.

2 answers

1

Friends, manage to solve the problem, actually my problem is in the configuration file of the site-available, within the configuration node had a directive Multiviews, according to the advice of a friend when removing such directive the problem would be solved.

Using the nano editor (English) I executed the following command to edit the settings:

sudo nano /etc/apache2/sites-available/default

I removed Multiview from the configuration node and after apache reboot the issue was solved

  • Related to this topic? http://answall.com/questions/7987/redirectionstrangel/8000#8000

0

Try it like this:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ sessao.php [L,QSA]

You really need this line below?

Options +FollowSymLinks

Browser other questions tagged

You are not signed in. Login or sign up in order to post.