Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Redirect .php extensions to new page using htaccess

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #39350
    dryan1144
    Member

    I have a site with a fresh WordPress isntall that has a lot of old .php pages that need to be redirected. (A blank statement that just drops the .php extension won’t work, I need to target specific pages).

    Example:
    /testpage.php needs to go to /test-page-new

    I’ve already set up htaccess 301 redirects for /test.html to /test which work just fine, but the .php extensions aren’t transferring.

    Do I need to use Rewrite and if so how do I implemetnt it with the existing rules generated by WordPress?

    Thanks!

    #107808
    SgtLegend
    Member

    You need to make sure that the redirects that are added to your .htaccess file sit before the WordPress RewriteRule’s otherwise that will seek out the PHP files before your redirects do.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.