Jump to content

URL Field - Local Links Only


Recommended Posts

When creating a URL field in a database, we should have the option as a toggle to limit links to same-site URLs only. In other words, if your site's canonical link is www.example.com and this option is enabled, then provided links may only be to pages on www.example.com.

Edit: I know I can provide regex for this as below, but I would consider this to be a bit of a hacky solution.

https?:\/\/www\.example\.com\/forums\/topic\/[0-9a-zA-Z-]+\/?

 

Edited by Foxtrek_64
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...