Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # PHP allowed URLs for Route
- ```php
- <?php
- $private_urls = array(
- 'temrns-conditions',
- 'contact',
- 'faq',
- 'confirmation'
- );
- $urls = implode('|', $private_urls);
- if (preg_match('(^(?!(' . $urls . ')$)[A-Za-z0-9][A-Za-z0-9_-]{2,254}$))')) {
- echo 'Allowed';
- } else {
- echo 'Denied';
- }
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement