403 Forbidden How to enable Put request in the apache server - laravel

On put request via ajax "403 forbidden access to server" is thrown on the page.I am using a shared hosting envirnoment.I dont have access to Server. I have checked related questions here but didn't see a solution that helps me.
Does anyone know how to fix this?
My htaccess file look like this
<IfModule mod_rewrite.c>
AddHandler application/x-httpd-php72 .php
RewriteEngine On
# Removes index.php from ExpressionEngine URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
</IfModule>
my question is possible duplicate of this question PATCH request 403 Forbidden
But I dont know where to insert the code on vhost
File structure
public is moved to public_html and other folders to root directory

Related

How do we make the cs cart api work after installation?

I installed cs cart on new server and also enabled the API user access. But the api is giving back 404 not found error. Not sure what is needed in here.
Can anyone please help!!
please try yoursite.com/api.php?_d=products (e.g. in browser)
if it works, make sure that .htaccess root file (for apache servers) has lines:
RewriteCond %{REQUEST_URI} ^api/(.*)$ [or]
RewriteCond %{REQUEST_URI} .*/api/(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*api/(.*)$ api.php?_d=$1 [L,QSA]
it might mean issue with mod_rewrite which is not configured or configured incorrectly on the server
p.s. if the server is on nginx, analogue configuration is needed
Enable API for an administrator user
Folow documentation
https://docs.cs-cart.com/4.9.x/developer_guide/api/index.html

Laravel hosting error 500

I have a laravel project. When I host it in a subdomain and add the file .htaccess to redirect to the public folder, I get the HTTP ERROR 500. First I thought that the error was from the host, but I changed the project and it worked, so the problem has to be the laravel.
my .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
I don't have any idea to resolve it.
Can any one help me?
I have some legacy apps running Laravel with Apache and for them this is the .htaccess that I use to redirect to the public folder.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

Server error VQMOD Opencart permissions: You don't have permission to access /shop/vqmod/install on this server

I have a website running with a content management system running in the root of my website. I have installed the latest version of Opencart in a sub-directory called "shop" - so www.domain.com/shop/
Everything works fine and I can use Opencart as expected.
I need to install VQmod so have uploaded the files to the root of the shop folder, I have set the correct permissions trying 755 and 777 but with no luck.
Every time I go to www.domain.com/shop/vqmod/install I get a 403 error.
Same with www.domain.com/shop/vqmod/
Forbidden
You don't have permission to access /shop/vqmod/install on this server.
Apache Server at domain.com Port 80
My .hta file is pretty much standard apart from taking out the index.php? out of the urls and a rewrite rule to say change the home link.
RewriteBase /shop/
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteRule ^index\.php$ http://%{HTTP_HOST}? [R=301,L]
I am running on an apache server mentioned in error and on plesk control panel. I am stuck!
Also I have a .hta file in my very root where the cms files are how do I ensure that does not conflict the with opencart website.
found it at last....
.htaccess in of vqmod is set to Deny from all. change it to allow and it should work fine!
Did you also change the file permissions for your www.domain.com/shop/index.php and www.domain.com/shop/admin/index.php files during vqmod installation?
This is vital as changes are made to these files during the auto-installation process.

mod_rewrite redirects to .html in error

I've just setup an AMP server on OSX 10.9 and have a bizzare problem which is not present on my live hosting server or my old WAMP server.
I want to redirect any URL that doesn't directly map to a file on the server to index.php. I'm using the following .htaccess code
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# prevent loop
RewriteCond %{REQUEST_URI} !index\.php
RewriteRule ^(.*)$ /index.php?/$1 [L]
when I try http://example.com/example there is no problem, but when I introduce another slash, for example, http://example.com/example/
I get the a 404 error The requested URL /example.html/ was not found on this server.
Server version: Apache/2.2.26 (Unix)
Looks like your problem is related to enabling of MultiViews here. Turn it off by using this line on top of your .htaccess:
Options -MultiViews
Option MultiViews is used by Apache's content negotiation module that runs before mod_rewrite and and makes Apache server match extensions of files. So /file can be in URL but it will serve /file.php.

Codeigniter URL Rewrite SSL HTTPS

Inside the LAN, we are good to go… folks access our intranet using http:// intranet All links and URLs work just fine and dandy (I removed index.php from links using URL Rewriting).
We are required to give access to the Intranet to certain outside folks.. we are accomplishing this using FTMG, the same way in which Outlook Web Access works.
Now, calls to https:// intranet.domain.org work, but links within the site do not work… for example:
https:// intranet.domain.org works
https:// intranet works
https:// intranet.domain.org/homepage FAILS
https:// intranet.domain.org/index.php/homepage works
https:// intranet/index.php/homepage works
(Disregard space after https://, I received errors for invalid links)
Taking away the 's' from https, and the entire site functions properly.
The dilemma should be clear… implementing the URL Rewriting is not work with https…
How do I make it work?
Note:
my config file =
$config['base_url'] = '';
my .htaccess file =
<IfModule mod_rewrite.c>
RewriteEngine on
Options +FollowSymLinks
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
Perhaps this will be of some help HTTP/HTTPS, without index.php, using htaccess

Resources