Category : .htaccess

I’m trying to run a website with phalcon on ubuntu server but I always got a Forbidden response Here is my htaccess in my public folder #IMPORTANT TO GET JWT FROM HEADERS RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule .* – [e=HTTP_AUTHORIZATION:%1] <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^((?s).*)$ index.php?_url=/$1 [QSA,L] </IfModule> And ..

Read more

I have found some roque URLs within Google Search Console which I am trying to remove. Somehow Google has found a number of URLs with a .php file extension. Within Stackoverflow I found this similar question : URL Extensions removal I added the following lines of code to my .htaccess : RewriteEngine on RewriteCond %{THE_REQUEST} ..

Read more

A PHP Error was encountered Severity: Warning Message: Cannot modify header information – headers already sent by (output started at /home/smknusa/public_html/application/controllers/admin/Login.php:16) Filename: helpers/url_helper.php Line Number: 564 Backtrace: File: /home/smknusa/public_html/application/controllers/admin/Login.php Line: 27 Function: redirect File: /home/smknusa/public_html/index.php Line: 315 Function: require_once Sourc..

Read more

I am having around 10 sites in a shared hosting. Recently I have noticed that there are so many .htaccess files have been created and restricting user access. <FilesMatch ".(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|suspected)$"> Order Allow,Deny Deny from all </FilesMatch> Above block is what is written in all code .htaccess. When I delete those, it appears to be regenerated ..

Read more

It works all good on my Local server. But on my Production server POST request body is empty as Content-Type header is being removed by my server somehow before it hits my Laravel site. (I have dumped headers at the top of public/index.php file but All other headers are there except ‘Content-Type’. Hence, $request->all() is ..

Read more

I am trying to hide the extension of .php file from the link for example www.example.com/about.php To display www.example.com/about what I did RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php [NC,L] and It works perfectly. but I have another link which example.com/news.php?id=45 according to the above rule, I can access the link ..

Read more

I have a rewrite rule to force user to go from example.com to www.example.com. For SEO reason that i have no duplicated websites and content on my google results. RewriteCond %{HTTP_HOST} ^example.com RewriteRule (.*) https://www.example.com/$1 [R=301,L] My question. If now people post a link example.com/news they always will redirect to the frontpage like www.example.com. How ..

Read more