HTML encoded URL not working with apache 2.4.2 - html-encode

I have some URLs with special characters, they all are working fine on apache 2.2.4 but breaking on apache 2.4.2.
This is one URL /%7Chier.3%5EFirst~group%5E/logo?(actual URL is /%7Chier.3^First~group^/logo?).
Can someone please help me why this working fine on apache 2.2.4 but breaking on apache 2.4.2?

Related

How to fix "URL rewrite vulnerability" in Laravel version 5.2.45

I am getting the below security warning in the scan report with a laravel project built in version 5.2.45.
URL rewrite vulnerability
Below is the description.
It was identified that this application supports the legacy headers X-Original-URL and/or X-Rewrite-URL.Support for these headers lets users override the path in the request URL via the X-Original-URL or X-Rewrite-URL HTTP request header and allows a user to access one URL but have web application return a different one which can bypass restrictions on higher level caches and web servers. Many web frameworks such as Symfony 2.7.0 to 2.7.48, 2.8.0 to 2.8.43, 3.3.0 to 3.3.17, 3.4.0 to 3.4.13, 4.0.0 to 4.0.13 and 4.1.0 to 4.1.2 , zend-diactoros up to 1.8.4, zend-http up to 2.8.1, zend-feed up to 2.10.3 are affected by this security issue.
Any suggestions on how to fix this will be much appreciated.
Maybe "composer update" after setting the new value in composer.json?
"laravel/framework": "5.3.*",
As documented here: https://laravel.com/docs/5.3/upgrade
Got the Fix. Added below code to the root htaccess file.
<IfModule mod_headers.c>
RequestHeader unset X-Original-URL
RequestHeader unset X-Rewrite-URL
</IfModule>

Remove port in apache tomcat 7 (linux Centos)

I have installed apache on centos and configured cpanel/whm.
I have a jsp project which is hosted on the server and also we need to maintain some php files for supporting helpdesk.
jsp project url is http:www.xyz.in:8090/jspproject/index.jsp
php files url is http:www.xyz.in/heldesk/index.html
helpdesk folder and jspproject are placed under public_html i.e. /home/account/publich_html.
The following task is required
When user types url either "http:www.xyz.in" or "http:www.xyz.in:8090" then jspproject should run (http:www.xyz.in/jspproject/index.jsp) and still url must be "http:www.xyz.in/jspproject"
When user types url as "http:www.xyz.in/helpdesk" then helpdesk (php files) should run (http:www.xyn.in/helpdesk/index.html) and url must be "http:www.xyn.in/helpdesk"
.htaccess is placed under /home/account/public_html/
Please advice me how to handle in .htaccess with rewrite rule.

Why PhpStorm doesn't using htaccess file?

I have an .htaccess file for page redirecting. It works fine in wampserver, but in phpstorm, it doesn't work and phpstorm doesn't use .htaccess.
For example, this works in wampserver:
localhost/Example/Page
This doesn't work in phpstorm:
localhost:63342/Example/Page
// 404 Not Found
Any thoughts on this problem?
.htaccess is used by the Apache webserver. It's not used by the PHPStorm web-browser though. If you want to be able to use it there, you would want to setup the 'Web path for project root' and point it to the appropriate location, as set in an Apache vhost.

Will changing version from .htaccess will affect performance

I am using hostgator web server to host my website. To use php 5.3 on my webserver I need to edit my .htaccess as
AddType application/x-httpd-php53 .php
I was just wondering if doing so will affect performance of webserver. Should I use there default version 5.2 or continue using 5.3 using rewrite.

Tomcat and htaccess

Is it possible to execute .htaccess file on Tomcat?
We are trying to get phphgadmin to work and so far we can only load the first screen that display some folder links. When we click on them we get a 404 error and we suspect it might be URL rewriting.
You can't run phpmyadmin on tomcat, because tomcat can't interpret php (nor it can interpret .htaccess)
What you need is Apache HTTP server, and if you need to also run Java, use mod_jk or mod_proxy_ajp (comparison) - a way to let apache serve what tomcat "produces".

Resources