Show The Same Content For Different URL Strings

0

I am trying to set up a system where for one of my directories, "example.com/folder/", if a user types in ".../folder/?(RANDOM STRING)", it will display the content for ".../folder/" but keep ".../folder/?(RANDOM STRING)" in the address bar.

This setup should work for any characters, random strings after the "/?"

I am assuming this can be done with .htaccess

Thanks for your help

acamso

Posted 2014-11-07T07:20:41.357

Reputation: 93

Can you specify which web server on which operating system you are using? – user3767013 – 2014-11-07T08:43:08.713

Answers

0

This is normal, expected behaviour: www.exmaple.com/index.html will serve static (or even dynamic content) but unless the content served explicitly changes due to the querystring there should be no changes in the served content. This is often used by web developers to manage caching of javascript/style sheets by appending a version string to the querystring, so /style.css becomes /style.css?v1.0 and then ?v1.1 and ?v2.0 etc.

If your website does not exhibit this behaviour, it is likely due to a redirect that strips the querystring, ie: www.example.com/folder?string does a 301 redirect to www.example.com/folder/.

wireghoul

Posted 2014-11-07T07:20:41.357

Reputation: 116