-
Notifications
You must be signed in to change notification settings - Fork 1
static Urls::rewriteCondRemove($cond, $htaccess=null)
micahbaumann edited this page Oct 12, 2022
·
1 revision
Removes a rewrite condition in the .htaccess file between the # --URLS ADD_COND BEGIN-- and # --URLS ADD_COND END-- markers.
| Returns |
|---|
| void |
| Parameter | Default | Type | Required | Description |
|---|---|---|---|---|
| $cond | - | String | ✔️ | The condition to remove to the .htaccess file. |
| $htaccess | NULL | String | ❌ | The path to the .htaccess file. |
<?php
/*
URLS framework url config file.
Add your paths here:
ex. $urls->path('blog/', 'blog-home.php', true);
*/
include 'urls/Urls.php';
Urls::$base = '/';
// Add to .htaccess
Urls::rewriteCond('# This is a .htaccess comment');
Urls::rewriteCond('# This is another .htaccess comment', dirname(__DIR__, 1).'\.htaccess');
// Remove from .htaccess
Urls::rewriteCondRemove('# This is a .htaccess comment');
Urls::rewriteCondRemove('# This is another .htaccess comment', dirname(__DIR__, 1).'\.htaccess');
$urls = new Urls;
$urls->path('blog/', 'blog-home.php', true);
$urls->exe();
?>