Problem with friendly url

2

I am facing issues with friendly url on my site.

My requests loop if I do this:

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

If I do this, I do not fall into the loop, but my request does not pass through my session.php:

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

However something strange happens with my server, even without the .htaccess and without the active apache rewriter module, if I call mydomain.com/page it will search first page.html if it does not find it 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 the DigitalOcean Cloud .

    
asked by anonymous 04.03.2014 / 00:18

2 answers

1

Friends, I was able to solve the problem, in fact my problem is in the site-available configuration file, inside the configuration node had a Multiviews directive, according to the advice of a friend when removing such directive the problem would be solved.

Using the nano editor I ran the following command to edit the settings:

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

I removed the Multiview from the configuration node and after restarting apache the subject was resolved

    
09.03.2014 / 04:21
0

Try it like this:

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

Do you really need this line below?

Options +FollowSymLinks
    
09.03.2014 / 01:51