Wamp Not Found The requested URL was not found on this server
Posted by: karimHarakeh (94.187.9.---)
Date: January 21, 2023 12:44PM

I'm using wamp v3.3.0 and apache v2.4.54 and created vhost for a project so when I visit the index page it works normally but when I visit any other route for example admin.demo.development/topics/list I get

**Not Found
The requested URL was not found on this server.

Apache/2.4.54 (Win64) PHP/7.4.33 mod_fcgid/2.3.10-dev Server at admin.demo.development Port 80**

I have tried so many solutions and nothing changed

my vhost configuration looks like

<VirtualHost *:80>
    ServerName admin.demo.development
    DocumentRoot "c:/wamp/www/demo/public-admin"
    <Directory  "c:/wamp/www/demo/public-admin/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

my hosts look like
127.0.0.1   admin.demo.development
::1 admin.demo.development

LoadModule rewrite_module modules/mod_rewrite.so is allowed in the httpd.conf file

I also tried adding .htaccess file in the public-admin folder with these in it

 <IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
</IfModule>
I don't know what I should try more!



Edited 3 time(s). Last edit at 01/22/2023 12:50AM by karimHarakeh.

Options: ReplyQuote
Re: Wamp Not Found The requested URL was not found on this server
Posted by: Otomatic (Moderator)
Date: January 21, 2023 03:33PM

Hi,

> for example admin.demo.development/topics/list

What is "list"? A file? A folder?

------------------------------------------------------------------------------------------------------------
Wampserver 3.3.0 32 bit - Apache 2.4.54.2 - PHP 8.2.0…7.4.33 - MySQL 5.7.40 - MariaDB 10.5.13/10.6.5
Wampserver 3.3.0 64 bit - Apache 2.4.54.2 - PHP 8.2.0…7.4.33 - MySQL 5.7.40/8.0.31 - MariaDB 10.5.17/10.10.2
PhPMyadmin 5.2.0 - MysqlDumper 1.24.5
on W10 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: Wamp Not Found The requested URL was not found on this server
Posted by: karimHarakeh (94.187.9.---)
Date: January 21, 2023 05:17PM

the list is a route so it's an old project that uses Zend framework and the list is a child route that is related to a controller that fetches the database for a specific result

Options: ReplyQuote
Re: Wamp Not Found The requested URL was not found on this server
Posted by: Otomatic (Moderator)
Date: January 22, 2023 10:07AM

Hi,

As requested: 'http://admin.demo.development/topics/list' and regardless of the .htaccess file, for this to work:
- if list is a file, it should be 'http://admin.demo.development/topics/list.php'
- if list is a folder, you need an index.php file in the list folder

As for "the list is a route" I don't understand what it is !

------------------------------------------------------------------------------------------------------------
Wampserver 3.3.0 32 bit - Apache 2.4.54.2 - PHP 8.2.0…7.4.33 - MySQL 5.7.40 - MariaDB 10.5.13/10.6.5
Wampserver 3.3.0 64 bit - Apache 2.4.54.2 - PHP 8.2.0…7.4.33 - MySQL 5.7.40/8.0.31 - MariaDB 10.5.17/10.10.2
PhPMyadmin 5.2.0 - MysqlDumper 1.24.5
on W10 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote


Sorry, only registered users may post in this forum.