The Requested URL was not Found on This Server. Laravel

When you are working with Laravel framework and get the requested URL was not found on this server. Laravel apache, means that rewrite mode is disable in .htaccess. To activate rewrite mode in .htaccess, so find and open .htaccess, which is located inside xampp/htdocs/laravel_project/public directory on the Windows system.

Here are steps to fix the requested URL was not found on this server. laravel xampp windows:

Step 1: Navigate Xampp/htdocs Directory

Now, Go to C:\xampp\htdocs\ directory.

Step 2: Open Laravel Project Folder in the Editor

Now open your laravel project folder in any text editor from the \xampp\htdocs\ directory.

Step 3: Configure .htaccess File

Now navigate to the public directory in the Laravel project directory, open the .htaccess file, And simply add the following code into 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]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

Step 4: Restart Xampp Windows

To restart your xampp server again on Windows, and as well as clear laravel app cache using php artisan cache:clear command on cmd, and you will see your error resolved.

Conclusion

That’s it; You have learned how to resolve error the requested url was not found on this server. laravel xampp windows.

Recommended Tutorials

AuthorDevendra Dode

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

Your email address will not be published. Required fields are marked *