How to limit URL length using htaccess file

I am hosting wordpress website on my linux server. How can I limit the length of URLs from htaccess file.

Suppose if I do not want to allow more than 100 characters as URL. What options can I use in order to limit the allowed number of characters in the URL?.

Read More

Thanks in advance!

Related posts

Leave a Reply

1 comment

  1. Suppose if i donot want to allow more than 100 characters as URL

    This is unusual requirement to have but still can be handled by Rewrite rule.

    Have this rule as your first rule:

    RewriteRule ^.{101,}$ - [F]