Problems with apache RewriteRule in 2:22

March 3, 2014 1.1k views
enabled the rewrite module with the command sudo a2enmod rewrite and changed sudo nano / etc/apache2/sites-available/default thereby: Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all 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..
1 Answer
your rewrite rule is not correct.

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...
Have another answer? Share your knowledge.