By iagoleao90
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!
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…
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.