All Questions
Tagged with query-string apache
4 questions
3
votes
1
answer
962
views
Redirect URL ending in certain `variable=value` query string, to `URL?variable` (i.e., strip `=value`)
I'm trying to create a 301-rewrite for URLs ending with ?amp=1 to nearly the same URL and query string, just stripping the value (=1).
Examples:
https://example.com/?amp=1 should redirect to https://...
9
votes
2
answers
42k
views
How can I use .htaccess to respond with 403 forbidden status for URLs that contain a query string?
Some bots have been crawling my site for every link that ends with:
?utm_source=dlvr.it&utm_medium=twitter
I haven't checked out its IP.
Then other bots (10+) follow the link rules ?utm_source=...
3
votes
1
answer
4k
views
Apache rewrite rule that matches a specific query string
I need to rewrite a specific WordPress URL to a 404 error:
?page_id=15 to 404
How can I match the query string? Apparently Apache doesn't feed that to the rewrite mod...
5
votes
1
answer
1k
views
How should incorrectly encoded URLs be handled?
Just recently noticed that some sites link with the URL incorrectly percent-encoded, to which my server (LAMP) responds with a 404 Not Found.
For example, for a URL of mine like this:
http://www....