Search Our Database

Troubleshooting Website Error 414 (Request URL Too Long) – Parameter in URL

Last updated on |
by

Introduction

This Knowledge Base entry addresses on the URL of the website was too long and cause server failed to interpret. One of the reasons that you are getting this error is because there is parameter included in the URL. This guidance will be showing the configuration in .htaccess to removing the parameter in the URL.

 

Issue

To find out that if your website URL is included the parameter, you see if have the word params. For example:

https://www.domain.com.my/?params=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789

 

Solution

1. Locate the website .htaccess file. You may refer to this for the guidance to login SSH.

Login as root privilege.

sudo su -

2. Navigate to the .htaccess file.

cd /home/<user>/domains/<your domain>/public_html/

 

3. List all file in public_html directory. 

ls -la

 

4. Edit the .htaccess.

vim .htaccess

 

5. Add the lines below in .htaccess.

Press i to enable edit mode

 

If you didn’t see the RewriteEngine, kindly add in and set the status to On.

RewriteEngine On

 

Else, you may proceed to add the lines in.

RewriteCond %{QUERY_STRING} ^(.*)&?params=[^&]+&?(.*)$ [NC]
RewriteRule ^ %{REQUEST_URI}?%1%2 [R=301,L]

 

6. Save edited .htaccess.

Press on ESC on your keyboard one time to exit edit mode
Type :wq and press enter to save

 

7. Browse the website. 

Now you try to browse the URL – https://www.domain.com.my/?params=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789

 

And you may see that the URL was changed in address bar and shows only https://www.domain.com.my/.

 

Important Notes:

  • It is highly recommended to back up .htaccess before editing, in case there are any mistake, and you still have a backup to refer.

Conclusion:

After following these steps, you should have able to browse the website without getting the error 414.

 

For additional assistance or if you encounter any issues, please contact our support team at support@ipserverone.com.