Problems with apache RewriteRule in 2:22

  • Posted 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 load find the same if you can not find it search . 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…


Submit an 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…