I have some additional menu tabs that someone on here was kind enough to sort out for me in the index.php file if I remeber.
Anyway........when I added pretty URLs it re wrote these menu links too and now they don't work.
I have tried using 301 re directs but these dont seem to work either.
here is an example:
RewriteEngine On
RewriteRule ^forum/smf//buying-a-new-home.htm$ /buying-a-new-home.htm
the two // are on the menu tab url.
Can anyone advise me how to get around this?
Seriously?
Personally, I'd say "Dump Pretty URLs. It's more trouble then it's worth".
How exactly did you add these urls? how are they written?
Quote from: K@ on April 15, 2013, 05:48:59 AM
Seriously?
Personally, I'd say "Dump Pretty URLs. It's more trouble then it's worth".
I agree.
Quote from: Suki on April 15, 2013, 09:08:52 AM
How exactly did you add these urls? how are they written?
I didnt add them someone on here kindly re wrote the index.templte.php file in the default theme for me.
Ihave found them here:
<td class="maintab_' , $first , '"> </td>
<td valign="top" class="maintab_back"><a href="/buying-a-new-home.htm">Buying a new home</a></td> <td valign="top" class="maintab_back"><a href="/information-for-moving-to-a-new-home.htm">Information & Moving advice</a></td> <td valign="top" class="maintab_back"><a href="/new-home-news-information.htm">News</a></td> <td valign="top" class="maintab_back"><a href="/snagging-and-quality-issues-with-new-homes.htm">Snagging & Quality</a></td> <td valign="top" class="maintab_back"><a href="/finding-a-brand-new-home.htm">House builders</a></td> <td valign="top" class="maintab_back"><a href="/help-to-resolve-problems-and-defects.htm">After you move in</a></td>'; // The end of tab section.
echo '
<td class="maintab_' , $last , '"> </td>
</tr> </table>'; }
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '') {
global $settings, $buttons, $context, $txt, $scripturl;
// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';
$button_strip[$key] = $buttons[$key];
}
if (empty($button_strip))
return '<td> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
I quite like the Pretty Urls and do not agree it is more trouble than it is worth.
I can identify which topics and threads get the most traffic really easy and I think it has improved my serps too.
Can you get rid of this?
RewriteEngine On
RewriteRule ^forum/smf//buying-a-new-home.htm$ /buying-a-new-home.htm
Not entirely sure how/why prettyURLs is getting in the way, but I don't know enough about it to say. The thing above is generating a link that doesn't exist which I realize is something you are trying to fix but the above isn't working either.
I have deleted the extra "/" in the index template so now the urk is correct.
I have tried the
RewriteEngine On
RewriteRule ^forum/smf/buying-a-new-home.htm$ /buying-a-new-home.htmIn mt root .htaccess and in /forum/smf adding to the pretty urls .htaccess and also in /forum/smf/themes and forum/smf/themes/default using a new .htaccess file.
All out of ideas now.
301 Rewrite should work, or does Pretty urls override it?
Sorry, TopMan. This seems to have dropped off the radar. :(
From the experience I've had, Pretty-thingy can cause all sorts of problems. Have to tried disabling it, or uninstalling it, even if only temporarily?
Hi K
Just Uninstalled pretty URLs and deleted from the webspace completely.
But surprisingly the menu tabs still have the wrong url.
All very confusing as perhaps pretty urls isnt the cause, it just coincided with the pretty url installation.
Reinstalled pretty and enabled it again,
All still a mystery to me.
Got a link to the page where this is happening? It needs to be accessible to guests, obviously.
It happens on every page as they are menu tabs.
See http://www.brand-newhomes.co.uk/forum/smf/index.php (http://www.brand-newhomes.co.uk/forum/smf/index.php) for example.
The tab block to the right of Register tab.
Right. Let's pick an example. The menu item "After you move in" is, currently, pointing to:
http://www.brand-newhomes.co.uk/forum/smf/help-to-resolve-problems-and-defects.htm
Where should it be pointing to?
You see, the code you posted doesn't, actually, contain any URLs, that I can see. So, can you attach your indextemplate.php
The URLs were in the code.
<a href="/help-to-resolve-problems-and-defects.htm">After you move in</a></td>
As I was typing this replyusing the full url address http://www.brand-newhomes.co.uk/....etc
I tried this in the index.php template code and hey presto it works.
Many thanks for your help with this.
You have guided me through what I needed to do and helped my think a solution through logically.
Always the best way, I reckon. :)
Glad you're sorted, mate.