Denied accessible config folder in yii2 - .htaccess

So i got this yii2 project, it works fine when i open the URL with http://localhost/myproject/index.php/login/index, but when i open http://localhost/myproject/config/, http://localhost/myproject/uploads/ and http://localhost/myproject/web/access it can access folder inside it.
how can i hide those folder or disable to access it by public?
here is the screenshot how it look like when i open those URL
i don't know why there is no htaccess in this project (i continue the project from the previous developer)

at the root of the project add a file called index.php with a redirect to the web folder like this
<?php
header("location: web/");
?>
with this when entering the root you will be redirected to the web folder, which will load your project and you will not see the folder structure

Related

Exclude a folder in Xenforo

I have installed Xenforo in my public_html in my Cpanel which means my forum is available in site.com
Now I want to add another folder contains my web app and want to access it in site.com/myapp. I created a folder "myapp" in public_htmll beside Xenforo files and now when I enter the URL site.com/myapp it goes to a 404 page of the forum. I need to Xenforo exclude this folder and let the app lunch in this address. How can I do that?
You should move your XenForo installation to a subdirectory - many people use site.com/community as the forum root and either have a separate home page at site.com/ or just redirect the domain root to the /community URL.
This then allows you to have other apps running in other subdirectories like site.com/myapp without issue.
In XenForo 2.x this works fine, If you have enabled full Seo friendly urls from admin panel, Make sure you have proper .htaccess file in place. In you case, I believe you did not upload .htaccess file in public_html folder

.htaccess load from sub folder but keep on showing main domain

I have a install that has a web folder that has the website stored in this. How can I make the domain load from this folder within the public_html folder.
The domain is like: sub.domain.co.nz
Don't put the entire Symfony project under the public_html folder - this will cause all of the project files to be accessible over the web, including .yml files that include sensitive information like database passwords!
Put the Symfony project files in a folder that is not web accessible. Then configure your web server so that the DocumentRoot points to the path of the web folder of the Symfony project, and also modify the paths of all the aliases.

LARAVEL 5 - host web server with API

I am trying to set me local project which works perfectly well on a host server (always data).
I made a project folder on the root (/project) of server where I uploaded all my files
I copied public folder into /www
Exactly how explained on this tutorial :https://medium.com/laravel-news/the-simple-guide-to-deploy-laravel-5-application-on-shared-hosting-1a8d0aee923e
First pages load perfectly, but when I am trying to connect with my api, the redirect URL returns a 403 Forbidden error
My redirect url is htp://.......com/public/play
It works when it is localhost but not on my web server...
Should I put www/play as redirect URL?
Why can I access my view on first page but not after redirection from api?
Thank you very much for the help !
You are not may be copying the content of public folder in the www directory Like it said
Next step is to copy all contents inside the /project/public directory
to www/ directory. The easy example is that, with the fresh Laravel 5
installation application, the project/public/index.php should be
copied to the www/index.php , have you got the point?
and you did
I copied public folder into /www

Could not access php file on core modules's external folder in social engine4

I have installed the plugin 'Advanced Search Plugin Like Facebook Search' of younet and I noticed the error that application/modules/Core/externals/scripts/ynadvsearch.php is not found.
Then I checked the location and the file was there. So I uploaded a test.php file and typed the url in address bar then also I could not access the test.php page. But I am able to access all the js pages on that folder.
I have deleted the htaccess file of external folder. But the issue remains the same.
How can we fix this?
It's a little weird, usually /externals/scripts folder is used only for javascript-files (and all php-files - inside of /controllers folder).
File .htaccess inside of /externals folder contains a rule
<FilesMatch "\.avi|flv|mov|wmv|wma|mp3|mp4|m4a|mkv|swf|pdf|doc|ppt|ico|jpg|jpeg|png|gif|js|css)$">`
It means that *.php files are not allowed for access inside of this folder.

magento bae url not working after dulicate site

I have a site http://www.gingerlily.fr
i copy those file and create sub directory on root called test and uploaded the file to it
duplicated db and apply update for all base url db and other configurations. (http://www.gingerlily.fr/test)
but the problem is when i access http://www.gingerlily.fr/test
site i always show root urls and other js and images loads from root magento installation. i try a day for thi but no luck.
can anyone help me for this something wrong with httacess file or any other wrong with this ?
thank you
I have seen your http://www.gingerlily.fr/. Correct me if i am wrong your trying to duplicate your site to test directory. But in magento your can't copy and duplicate site like PHP /Html here your files of magento site need to be first install and you can replace your module and theme files.

Resources