0

My URLs look like this:

mywebsite.com/subpage-name.php

I want my new links to look like this:

mywebsite.com/subpage-name/

How can I redirect all my ".php" pages to "/" pages?

Nate
  • 1
  • 2

1 Answers1

1

You have to add a RewriteRule in your .htaccess with a regex.

RewriteRule ^(.*)$ http://www.thenewdomain.com/$1 [R=permanent,L]

Make sure to add

RewriteEngine on

Before applying the redirect rule.

Happy Coding.

Maaz Ali
  • 83
  • 5
  • THe domain would stay the same. I only want to change the ending of the links from .php to / – Nate May 08 '18 at 10:30