Reputation: 11
Django redirects app
I added this , in my installed app section in settings.py
'django.contrib.redirects',
MIDDLEWARE = [
'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
]
I added the sites in the admin panel
domain name : http://127.0.0.1:8000/
I added redirects in the admin panel. old link : redirect from : /index/
& new link : redirect to: /index.html
I didn't mention this URL link in my urls.py like below
path('index.html/', views.index, name='index'),
I check the invalid URL as new URL.
I run the local server. its not working
Upvotes: 1
Views: 40