I want to rewrite the url of my website, in wamp this works fine, but when I have xamp installed this doesn't work.
In my file .htaccess I have this
RewriteEngine On RewriteRule ^([A-Za-z0-9-]+)/?([A-Za-z0-9-]+)?/?([A-Za-z0-9-]+)?/?$ ./index.php?q1=&q2=&q3=&q4=&q5=%5
When I open the project in localhost it shows the report "Note: Undefined index: q1 in C:\xampp\htdocs\admaposta\index.php on line 6" along with other variables.
I've searched for answers and everything in my httpd.conf has "AllowOverride All" and the "LoadModule rewrite_module module/mod_rewrite.so" line is uncommented.
You have error reporting turned on, you should turn it off if you don't want to see it, the override may also work, but there will still be some errors, which may not cause the initial problem, but assuming the variable is set.
You can even turn off warnings in PHP settings; Or just add it to your php file to not show it.
Source: "Caution: undefined variable", "Caution: undefined index", "Warning: undefined array key" and "Caution: undefined offset" using PHP
Since this is a new installation, you may need to adjust the XAMPP installation and check what settings are used by the WAMPP installation. See the php.ini file for settings for wampp installations, and change php.ini in xampp installations.