This question is related to How to configure Django to redirect multiple slashes (/) to single slash
I use Apache/mod_wsgi and I want 301 redirect instead of Apache just removing the slashes.
This question is related to How to configure Django to redirect multiple slashes (/) to single slash
I use Apache/mod_wsgi and I want 301 redirect instead of Apache just removing the slashes.
2
Answers
If you are using Apache can’t you simply do this with mod_alias
i.e. (where foo.bar is your domain)
This situation is simple to resolve using a tasty slice of .htaccess.
All you need to do is copy the following code and place it anywhere in your site’s root .htaccess file:
For Example:
I got the answer from this blog