Hello I would like to ask a question about getting a directive working in htaccess under wamp apache.
this is my wamp set up
1) Os
Windows 10 HOME 64 bit version 1903
build 18362 (Windows 10) AMD64
2 - Version WampServer :: 3.1.9 64 bit
3 - Apache Version :: 2.4.39
4 - PHP Version :: 7.3.5
5 - MySQL Version :: 5.7.26
5a - MariaDB version :: 10.3.14
WampServer icon is green:
8 - Do you have access to localhost (Homepage WampServer)?
yes
8a - If so, is there an error message at the bottom of the page?
no
9 - Do you have access to phpMyAdmin?
yes
10 - If you refer to an error message, please include the EXACT wording of the error in your post
in the apache error log I found
[core:alert] [pid 10960:tid 1236] [client ::1:50614]/..../.htaccess: AllowOverride not allowed here, referer: ....
11 - If you use an Antivirus and / or Firewall, please include the names of these
WINDOWS DEFENDER
12 - What is the full path to the installation of WampServer
D:\wamp64\wampmanager.exe
13 - If you have one or more Virtual Hosts defined, please show their definition(s)
<VirtualHost *:80>
ServerName mywebsite.localhost
ServerAlias *.mywebsite.localhost
DocumentRoot "D:/wamp64/www/mywebsite"
<Directory "D:/wamp64/www/mywebsite/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I want to get rid of extensions in the url address bar, so I made a .htaccess file and placed it in a new subdirectory with a new virtual domain pointing at it.
I checked php_info() , rewrite engine is on and so is mod_mime ( at least it is loaded in the modules list )
Some directives work in the htaccess file but if I want to use directives to change the extension .php I get no result.
this is the directive I used:
RewriteEngine On
RewriteRule ^([^\.]+)$ $1.php [NC,L]
then I added AllowOverride All above it.
This makes the page crash
in the apache error log I found
[core:alert] [pid 10960:tid 1236] [client ::1:50614]/..../.htaccess: AllowOverride not allowed here, referer: ....
I have been searching for more than a day now. The WAMP server might be casted in a specific way to get it working.
Can someone tell if any other conf files have to be adjusted and in what way should this be done?
this is my wamp set up
1) Os
Windows 10 HOME 64 bit version 1903
build 18362 (Windows 10) AMD64
2 - Version WampServer :: 3.1.9 64 bit
3 - Apache Version :: 2.4.39
4 - PHP Version :: 7.3.5
5 - MySQL Version :: 5.7.26
5a - MariaDB version :: 10.3.14
WampServer icon is green:
8 - Do you have access to localhost (Homepage WampServer)?
yes
8a - If so, is there an error message at the bottom of the page?
no
9 - Do you have access to phpMyAdmin?
yes
10 - If you refer to an error message, please include the EXACT wording of the error in your post
in the apache error log I found
[core:alert] [pid 10960:tid 1236] [client ::1:50614]/..../.htaccess: AllowOverride not allowed here, referer: ....
11 - If you use an Antivirus and / or Firewall, please include the names of these
WINDOWS DEFENDER
12 - What is the full path to the installation of WampServer
D:\wamp64\wampmanager.exe
13 - If you have one or more Virtual Hosts defined, please show their definition(s)
<VirtualHost *:80>
ServerName mywebsite.localhost
ServerAlias *.mywebsite.localhost
DocumentRoot "D:/wamp64/www/mywebsite"
<Directory "D:/wamp64/www/mywebsite/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I want to get rid of extensions in the url address bar, so I made a .htaccess file and placed it in a new subdirectory with a new virtual domain pointing at it.
I checked php_info() , rewrite engine is on and so is mod_mime ( at least it is loaded in the modules list )
Some directives work in the htaccess file but if I want to use directives to change the extension .php I get no result.
this is the directive I used:
RewriteEngine On
RewriteRule ^([^\.]+)$ $1.php [NC,L]
then I added AllowOverride All above it.
This makes the page crash
in the apache error log I found
[core:alert] [pid 10960:tid 1236] [client ::1:50614]/..../.htaccess: AllowOverride not allowed here, referer: ....
I have been searching for more than a day now. The WAMP server might be casted in a specific way to get it working.
Can someone tell if any other conf files have to be adjusted and in what way should this be done?