Reputation: 1612
I've tried to rewrite the URL of the website foto.php
to Aquaria.php
but for some reason it doesn't work, I'm not getting a console error or an error on the page.
I've placed the htaccess.htaccess
file in the root directory of my Aquaria
website.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
options +FollowSymLinks
RewriteRule foto.php(.*) Aquaria.php$1 [PT]
</IfModule>
I've used the following links to educate myself on how to use htaccess:
I've checked if there was a #
before: LoadModule rewrite_module modules/mod_rewrite.so
and it wasn't there, I then went on to try changing AllowOverride None
to AllowOverride ALL
as suggested by the third link, this didn't work either. After researching AllowOverride None
I read that it shouldn't be used because it may grant access to all files for every user on the website.
Using phpinfo();
I checked if the Rewrite Module was loaded, which it was, I checked it where it says Loaded Modules
, where I found mod_rewrite
TL;DR: The rewrite module doesn't give an error in the console on LocalHost, neither does it give an error on the page, I've used the links mentioned above to educate myself little by little to get to where I'am now.
Upvotes: 1
Views: 1976
Reputation: 3841
Your file name must be .htaccess
without a filename
To rename a .htaccess file without filename,
Upvotes: 1