Viewing 3 replies - 1 through 3 (of 3 total)
  • Tyler

    (@tylerthedude)

    Hi @ekaboom,

    Thank you for reaching out. The redirect from the PHP file to the WordPress page likely won’t work since WordPress isn’t being loaded on that PHP file so the code in Pretty Links that handles the redirection can’t run.

    I’d recommend adding a call to the header() function at the top of your PHP file you want to redirect, and then you could issue the redirect to your WordPress page using the “Location” header. I’ll provide an example of how that may look below:

    header( "Location: https://domain.com/wordpress-page", true, 301 );

    This will perform a 301 redirect to https://domain.com/wordpress-page when that PHP file is accessed.

    I hope this helps!

    Kind regards,

    Thread Starter ekaboom

    (@ekaboom)

    So I’ve been trying to test this extensively and it seems to work on a regular install but not on a multi site install.

    Tyler

    (@tylerthedude)

    Hi @ekaboom,

    Thank you for getting back to me. Are you not able to access the PHP file when you’re using multisite, or are you able to access the file but the redirect using that header() function doesn’t run?

    I look forward to hearing from you!

    Kind regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can the “pretty link” be a .php link?’ is closed to new replies.