I am currently running Apache2 on my local computer installed with the latest version of Ubuntu.
I am trying to get a basic URL rework using a .htaccess file.
The file " http: //localhost/page.php? = Home " exists, but the location "/ doesnotexist / home" does not work.
I would like the first page to load when the second is requested.
My .htaccess file looks like this:
RewriteEngine On RewriteRule ^/doesnotexist/(.*)$ /page.php?p=$1
My httpd.conf file looks like this:
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so <Directory /var/www> AllowOverride All </Directory>
Please note that my httpd.conf file looks the same as it was empty before I edited it.
As a result, I get the following:
Not Found The requested URL /doesnotexist/home was not found on this server.
I am from this problem googled from life, and I have never received anything but the error above.
If anyone has any ideas, I would be very grateful.
source share