WordPress.org

Forums

Redirection
2 "how to/best way" Redirect Syntax questions (2 posts)

  1. syrupcore
    Member
    Posted 1 year ago #

    Hi,

    I'm sure these are answered in this forum already but WP's plugin forum search is pretty much useless.

    I just set up a load of redirects (thank you for the import feature!) for a site that was static until yesterday, WP driven as of today. They are almost all 1:1 redirects from /blah to /blah-blah or /foo/index.html to /foobar/.

    First question: Should I always start with a ^caret?

    I didn't include the ^ at the beginning nor the $ at the end like I likely would if I did the by hand in the .htaccess file for the bulk of the redirects because they are 1:1 (and because the examples on the plugin pages didn't use them). Is this ok? I'm assuming the plugin is using PHP to redirect, not Apache but I'm not sure what difference that makes if any at all. Most seem to be working as is.

    Second Question: How to match for both /foobar/ and /foobar/index.html

    Is this the best way: ^/foodbar(/|/index.html)$ with regex set to 'On'?

    Thank you!

    https://wordpress.org/plugins/redirection/

  2. syrupcore
    Member
    Posted 1 year ago #

    EDIT on the second question:

    Second Question: How to match for /foobar, /foobar/ and /foobar/index.html

    Is this the best way: ^/foodbar(/|/index.html|)$ with regex set to 'On'?

    Seems to be working in limited testing but I fear I'm missing something.

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Redirection
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.