Secretly stashed away on internet browsers but easily found on Windows Explorer

I seem to be facing a problem that is reminiscent of this

After cloning a Laravel project from Github and setting it up on my local Wamp server with a designated hostname, I encountered a "500 internal server error" when trying to access the project through my browser (Chrome). This issue was new to me, as configuring virtual hosts on Wamp had always been a straightforward process in the past.

To troubleshoot, I attempted to view the project directory directly in my browser and realized that all directories and files were visible except for the public directory.

While the public directory appeared normally in my code editor and Windows Explorer, it remained hidden when accessed via my web browser, preventing me from running the application.

What steps can I take to make the public directory visible in my browser?

If I remove the content of the .htaccess file within the public directory, it becomes visible. However, once I add back the default Laravel .htaccess configurations, it disappears again.

Despite trying to set the directory permissions to 777 using PHP's chmod function, the public directory remains hidden from the browser.

Answer №1

After much searching, I was able to identify the perpetrator.

Upon inspecting my htaccess file, I came across the suspicious line SecFilterEngine Off. When I decided to comment it out, the previously hidden public folder suddenly reappeared. It seems that disabling mod_security may have played a role in this unexpected outcome.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Adjust the size of an HTML image for printing using a JavaScript window.print() function

On my website, I have a print option set up where specific elements are hidden using @media. How can I adjust the size of an image within the @media query when my JavaScript print function is triggered? I am able to modify a regular div element easily, but ...

Tips for repositioning an element to the top of an array

Currently, I have extracted rows from a table. The row we are targeting has an id that matches $_GET['id']. My objective is to relocate this specific row to the top of the list. $sq = "select * from video order by ind asc"; $st = $db-&g ...

Looking for a way to view the files uploaded in a form using ajax?

Currently, I am encountering an issue while attempting to upload a file submitted in a form using PHP. To avoid page reloading, I have incorporated JS, jQuery, and AJAX between HTML and PHP. Unfortunately, I am facing difficulties with the $_FILES variable ...

Tips on Getting Your Contact Form Operating Smoothly

Hey everyone, I'm exploring the world of web design and have a question about getting my contact form to work on my current theme. Below is the HTML code I am using: I would greatly appreciate it if someone could help me with coding the PHP file; doe ...

PHP problem with uploading files

It's been a frustrating day trying to figure out why this script isn't working properly. When I try to upload a file, the page loads but there is no image displayed. I'm new to file and image uploads, so I've experimented with different ...

Creating a unique SHA-1 hash using data from the post parameters

Need a service that can generate an SHA-1 encoded string from variables passed through POST method. Haven't found any service so considering PHP solution. If opting for custom PHP coding, seeking best practices for creating SHA-1 strings. Any recomme ...

Query access in Laravel Model file

In my User.php file, I have defined a relation and a function: class User extends Model { public function children() { return $this->hasMany(self::class, 'level1_user_id') ->select(['id', 'first_na ...

How to generate a custom JSON key name in PHP using Laravel

Currently, I am utilizing imagick to extract a number of pages and then store it in JSON format. However, the number is stored as is without any key, for instance - 20. I am seeking a way to store the number with a specific key like below: { "pages": " ...

Access a file containing raw CSV data in PHP, unpack the array and subarray, modify the content, then repackage and save the file

My objective is to open the file temp.php, then split it by ### (line terminator) and %% (field terminator). I want to update a specific field on a specific line, then combine everything back together and save it. There are several variables involved: ro ...

Transmit information to PHP via JSON with Cross Domain communication

My code is server1 and PHP code is server2. These servers are not connected. What issues can arise from this setup? var req = new XMLHttpRequest(); req.open("POST", "http://www.example.com/form/data.php", true); req.setRequestHeader("Content-type", "ap ...

Search for data in a JSON file using PHP and retrieve the desired result

Looking for a specific item from my JSON File and its corresponding ID? Here's the code snippet to search for the item name based on the provided ID. CODE: $jsonitem = file_get_contents("data.json"); $objitems = json_decode($jsonitem); $findIt ...

Select a file and upload an image promptly after it is chosen

Is there a way to automatically upload an image once a user selects a file in their browser? Similar to how it works on Facebook, where users can choose a file for their cover or profile image and then the upload process begins. Currently, all I have is ...

Issues Persist with Updating mySQL Database using PHP

I've been attempting to insert location data into a MySQL database using my PHP server from the TripTracker Android App. However, despite trying different approaches in PHP, I have not been successful so far. Any assistance would be much appreciated. ...

Creating a fresh .pot template from a converted .po document: A step-by-step guide

After beginning with an incomplete gettext .pot file, the final .po translation file now contains numerous translation strings that were not present in the original .pot file. Is there a way to retroactively create a .pot file for other languages (strings ...

Show both sets of data in two tables on one page

Currently, I have two tables named users and vm_tables. I am currently displaying data from the users table in the following manner: $sel_query = "SELECT * FROM users WHERE account_id=".$_SESSION['admin_id']; <td align="left"><?php ech ...

Updating All Values in "ng-repeat" Using AngularJS

I am facing an issue with ng-repeat where only the last value of "frais" is being updated. Is there a way to update all values displayed by ng-repeat? Here is the code from file.html: <ion-content class="padding" ng-controller="FactureAdminCtrl" ng-re ...

Assigning numerical ratings to a web-based questionnaire in HTML

In my questionnaire, I have radio buttons and checkboxes that need to be graded. The format of the input elements looks like this: <input type="radio" name="1" value="Yes" onclick="document.getElementById('pls').setAttribute('requi ...

Is there a way to resolve an unexpected T string issue in PHP?

I'm facing a problem with my script where it throws an unexpected t string error on line five. Can anyone help me fix this issue? <?php include_once("../scripts/config.php"); $url = mysql_real_escape_string('$_POST['url']'); ...

Content is not appearing within the component when using a router-link

I'm encountering some troubles with the router-link functionality in my project. Here is a breakdown of what I have: Routes.js: import Homepage from './components/homepage/Homepage' import About from './components/About' export ...

What is preventing my MySQL foreign key from being created?

I have been experimenting with different methods to create a table that includes a foreign key and then insert it into phpMyAdmin. Unfortunately, the results are not meeting my expectations. Here is what I have tried: CREATE TABLE user ( user_id BIGI ...