I want to stop access on specific directory under hosting - hosting

As I am working on downloading site under woocommerce.
today I checked anyone can get access on my wp-content directory.
https://matrixspecialists.com/wp-content/uploads/
can anybody suggest me how can i stop this access.
thanks

Open .htaccess file add this line Options -Indexes this will give a 403 forbidden error, you can add Error 403 http://yoursite in htaccess to redirect users who tried to view this directory

Related

I am getting 404 error for my laravel site

I am getting error for my laravel website such as,
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I have checked my .htaccess file which is in correct way,and I have checked with my hosting server they are saying me that your directory is not redirecting in proper way, Bt previously my site is working properly and suddenly this happen.
So any one have any idea about how to recover from this.
Do one thing to set permission for project folder to check whether it correct or not

Joomla Temporary URL images forbidden 403

I have setup a development server for an issue(see No Input File Specified - Joomla), all is working correct now on the development server apart from no images on the site or inside the administration menu are loading.
When I try to look at them individually they are 403 forbidden.
http://37.26.108.168/~arbersho/
All directories are 755, all files are 644 and the owner is the correct one.
Is this because of the temporary URL and will this be fixed by pointing the domain over?
Thanks again
This was a htaccess issue which is fixed.

Permission in index file of magento can not be changed

The link of the site is http://petonlineboutique.com/. The error which is showing in browser that is 403 forbidden error."You don't have permission to access /index.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request".
By google search we came to know that this forbidden error shows at that time when there is no enough permission.
Later I have noticed permission in all the files and folders of magento folder can be changed and made to 777 but index file permission is showing 000 and can not be changed.
So to get rid of this forbidden error if I need to put permission in index file, I can't put.
So help me what should I do now and tell us the reason why forbidden error and I can't change permission from cpanel.
There is no way around this. The only solution is changing permissions of the file, you just need to find out how to do it. If it won't allow you to change permissions on the file, you need to contact your host.

CodeIgniter uploads directory

I'm trying to achieve:
I am using CodeIgniter.
I am trying to access http://localhost/mywebsite/uploads/. The directory exists, and via a 3rd party upload script, I can successfully write to that directory. However, when going straight to the URL (or referencing its files in an src attribute), it gives me a 404 error.
I thought the best way to do this was to:
Make sure my $config['base_url'] was set to http://localhost/mywebsite/.
(For an unknown reason, I can access /mywebsite/js/ but not /mywebsite/uploads/.)
I read the documentation and it said to:
Create a folder at the root of your CodeIgniter installation called
uploads and set its file permissions to 777.
That works to upload to, but it doesn't work to access from!
I did it, I expected to see:
Either a directory listing or permission denied page. I even tried going straight to a file, like http://localhost/mywebsite/uploads/myfile.jpg.
Instead, I saw:
404 Page Not Found
The page you requested was not found.
What am I doing wrong?
Please check your .htaccess file,
there shouldn't be any rule to restrict the access to the uploads folder.
("uploads" should not appear within this rule: RewriteRule ^(css|js|ckeditor) - [L])

Getting 401 error in Joomla backend when trying to login\logout or edit anything

I have a website built on Joomla.Everything seemed to be going fine when all of a sudden I am noticing the following.
When I go to the administrator login page, once I fill my details and press login, I am getting a 401.shtml page with following message -
"Not Found
The requested URL /401.shtml was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.5 Perl/v5.8.8 Server at www.shillingstudios.com Port 80"
Now as per my understanding the 401 error would mean that I do not have the authorization to visit that page or do what I am trying to do.Maybe I am not entering the correct username or password.
However,my username and password are correct.Moreover if I go back to the admin login page I find that I am logged into the administrator panel, which means that my login attempt was successful even though I was directed to 401.shtml page.
The same thing happens when I try to logout(on refresh I find that I had successfully logged out)
When I try to Save/Edit/Close an Article/Category/Section I am redirected to the same page.But in each instance I am actually able to successfully do what I was trying to do.
The only change that I made prior to this issue was installing following plug-ins:
Set Generator tag plug-in
Title Manager plug-in
I installed both plug-ins for SEO purpose from http://extensions.joomla.org/extensions/site-management/seo-a-metadata
I thought that the issue might have caused due to installing these plug-ins so I disabled them, but the problem is still there.
I am trying to setup a website for an Android game that I am developing and Joomla seemed a good option for creating my own website. However I do not have much idea about PHP or MySQL or how Apache server works.So I am not able to determine why this is happening and what can possibly fix this, so any help will be appreciated.
You could try making sure that your website URL is in the 'live site' field in the config.php file. That can sometimes help.
First you should create your custom error pages – you can use a text/HTML editor of your choice (for example Dreamweaver). Once you are ready with the pages, upload them into a subdirectory of your public_html called errors. Then open your main .htaccess file and add the following lines in it:
serve custom error pages
ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html
Important settings:
Search Engine Friendly URLs: Yes
Use Apache mod_rewrite: Yes
Mod_login settings: All defaults from installation
edit:
I did rename htaccess.txt into .htaccess

Resources