Only display mod_rewrite rules if a permalink structure is set.
git-svn-id: http://svn.automattic.com/wordpress/trunk@501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7a1cd62048
commit
44365a46d5
|
@ -91,6 +91,9 @@ default:
|
||||||
<input type="submit" name="Submit" value="Update">
|
<input type="submit" name="Submit" value="Update">
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
<?php
|
||||||
|
if ($permalink_structure) {
|
||||||
|
?>
|
||||||
<p>Using the permalink structure value you currently have, <code><?php echo $permalink_structure; ?></code>, these are the mod_rewrite rules you should have in your <code>.htaccess</code> file.</p>
|
<p>Using the permalink structure value you currently have, <code><?php echo $permalink_structure; ?></code>, these are the mod_rewrite rules you should have in your <code>.htaccess</code> file.</p>
|
||||||
<?php
|
<?php
|
||||||
$site_root = str_replace('http://', '', trim(get_settings('siteurl')));
|
$site_root = str_replace('http://', '', trim(get_settings('siteurl')));
|
||||||
|
@ -136,6 +139,15 @@ for ($i = 0; $i < count($tokens[0]); ++$i) {
|
||||||
RewriteRule ^<?php echo $match; echo '$ ' . $query ?> [QSA]</code></p>
|
RewriteRule ^<?php echo $match; echo '$ ' . $query ?> [QSA]</code></p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<p>
|
||||||
|
You are not currently using customized permalinks. No special mod_rewrite
|
||||||
|
rules are needed.
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
echo "</div>\n";
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue