1

I want to redirect

  1. https://example.com/index.php to https://example.com

  2. https://example.com/view/india.php to https://example.com/india

  3. https://example.com/view/city/india/chennai.php to https://example.com/india/chennai

this is what i want to acheive anyone please send me the .htaccess code for this problem.

Manoj S
  • 11
  • 2
  • Have a look here : https://stackoverflow.com/questions/18973058/how-to-remove-folder-name-from-url-using-htaccess It describes how to remove a folder name from an url using .htaccess – Finalmix6 Jan 02 '22 at 18:44
  • I am new to .htaccess I tried to understand but can't I need the .htaccess code the questions I have asked. – Manoj S Jan 02 '22 at 18:47

1 Answers1

0

You'll be using

RewriteEngine  on
RewriteRule ^(.*)$ $1.php