Report this

What is the reason for this report?

Problems with apache RewriteRule in 2:22

Posted on March 3, 2014

enabled the rewrite module with the command sudo a2enmod rewrite

and changed sudo nano / etc/apache2/sites-available/default thereby:

<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>

Only if perchance there is a file with the same name is independent of the extent it does not go through mine. Htacess

RewriteEngine On RewriteBase / RewriteCond% {REQUEST_FILENAME}!-F RewriteCond% {REQUEST_FILENAME}!-D RewriteRule ^ (. *) $ Sessao.php [NC, L, QSA] Here too my sessoes.php:

$ gets = explode (“/”, str_replace (strrchr ($ _SERVER [“REQUEST_URI”]), “”, $ _SERVER [“REQUEST_URI”]) “?”);

for ($ i = 1; $ i <= count ($ gets); $ i + +) {      $ var = “p $ i”;      $ $ var = addslashes ($ gets [$ i]); } if (file_exists ($ p1… “php”)) {      include (“$ p1 test.”. “php.”); Else {}      header (“Location: /”);      exit (); } Practical example of the situation: If I call him http://107.170.237.146/base load http://107.170.237.146/base.html find the same if you can not find it search http://107.170.237.146/base . php if he does not find load sessoes.php

But right serious: He always sessoes.php first pass through and then drop the html or php…



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

your rewrite rule is not correct. <br> <br>if I understood you correctly, I guess your htacces should be in your root path right the end where files and folders can be accessed to clients, not in your config file…

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.