I
I
Ingvar Von Bjork2021-12-27 21:22:03
Apache HTTP Server
Ingvar Von Bjork, 2021-12-27 21:22:03

How to set up .htaccess for Post Title links?

When using the "Simple" links, everything works fine, but as soon as I switch to the "Post Name" error 404 appears on all links. Without plugins and on the default theme, the error remains, i.е. the cant is most likely in the .htaccess setting in apache2 itself. How to set it up correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
heartdevil, 2015-08-28
@heartdevil

Where are you taking this out?

<?php echo $entry_child; ?>


<?php if ($child_visible) { ?>

<?php echo $text_yes; ?>
<?php } else { ?>

<?php echo $text_yes; ?>
<?php } ?>


<?php if (!$child_visible) { ?>

<?php echo $text_no; ?>
<?php } else { ?>

<?php echo $text_no; ?>
<?php } ?>

If this is called earlier than the variable declaration in the controller, then this error may occur.
Here is the code for declaring a variable and storing in data should be before any call.
if (isset($this->request->post['child_visible'])) {
$data['child_visible'] = $this->request->post['child_visible'];
} elseif (!empty($module_info)) {
$data['child_visible'] = $module_info['child_visible'];
} else {
$data['child_visible'] = "1";
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question