HTACCESS: Cut Slash and And-Character (/&) from URL
Question by Mail Request | 2017-03-26 at 13:17
How is it possible to remove a slash and a following &-character from a web address? Constantly, I get requests to my website with "/&" attached to the URL. However, those pages are not existing and therefore I always get lots of 404 error messages. Thanks in advance!
Related Topics
Create URL for Website from Title of Page
Tutorial | 0 Comments
HTACCESS: Crop Trailing Slash from the end of a URL
Tip | 0 Comments
JavaScript: Remove last character from string
Tip | 5 Comments
Create Custom Error Pages for Website
Tip | 0 Comments
Block specific IP Addresses with HTACCESS
Tip | 0 Comments
HTACCESS: Simplify URL
Tutorial | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
You can try the following Rewrite Rule in your HTACCES-file:
This should redirect URLs like "askingbox.com/test/&" to "askingbox.com/test". If you additionally also wants to redirect URLs without &-character, you can use both of the following RewriteRules:
These rules are caring about that "askingbox.com/test/" as well as "askingbox.de/test/&" will be redirected to "askingbox.de/test".
2017-03-26 at 17:27