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?

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

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 !

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.