PDA

View Full Version : Url //


whatcomweb
11-14-2006, 07:16 PM
My URL's are displayed with and extra slash whenver a link detail is selected. How do I fix this?

http://www.bigtimelinks.com//failover-cpanel-web-hosting-l1.html

at

www.bigtimelinks.com

Thanks!

Michael Hill
11-15-2006, 08:24 AM
Is this appear with links assigned to Root category?

In this case 'path' is empty, as you can see in your URL.

Try to do next: find in your current template file link-display.tpl

Find code:

{if $config.mod_rewrite}
{if 'search' eq $tab}
{assign var="link_title" value=$link.title2}
{else}
{assign var="link_title" value=$link.title}
{/if}
<a href="{$config.base}{$config.dir}{$link.path}/{convert_str string=$link_title}-l{$link.id}.html">{$lang.link_details}</a>
{else}
<a href="{$config.base}{$config.dir}view-link.php?id={$link.id}">{$lang.link_details}</a>
{/if}


And replace it with follow


{/if}
{if $link.path eq "Root"}
<a href="{$config.base}{$config.dir}/root/{convert_str string=$link_title}-l{$link.id}.html">{$lang.link_details}</a>
{else}
<a href="{$config.base}{$config.dir}{$link.path}/{convert_str string=$link_title}-l{$link.id}.html">{$lang.link_details}</a>
{/if}
{else}
<a href="{$config.base}{$config.dir}view-link.php?id={$link.id}">{$lang.link_details}</a>
{/if}


Save file.

Hope, it will help to you.

Sergey Ten
11-16-2006, 06:22 PM
Hello whatcomweb,

There is more one solution ;)

*** Open templates/your_template/link-display.tpl ***
*** Find code ***


<a href="{$config.base}{$config.dir}{$link.path}/{convert_str string=$link_title}-l{$link.id}.html">{$lang.link_details}</a>


*** Replace with ***


<a href="{$config.base}{$config.dir}{if $link.path}{$link.path}/{/if}{convert_str string=$link_title}-l{$link.id}.html">{$lang.link_details}</a>


*** Save changes ***


*** Open your .htaccess file ***
*** Find code ***


# mod_rewrite rules for view link page
RewriteRule ^(.*)/(.*)-l([0-9]+).html$ view-link.php?cat=$1&title=$2&id=$3 [QSA,L]


*** After add code ***


RewriteRule ^(.*)-l([0-9]+).html$ view-link.php?cat=0&title=$1&id=$2 [QSA,L]


*** Save changes ***

slederman
12-26-2007, 07:00 PM
Hi,

I just installed version 2.2 here: http://allthingsmath.com/directory

I notice that some of the categories get a leading slash in their paths and others don't. I'm never ever putting in a leading slash so this sounds like a bug. The leading slash shows up when I go to manage the categories but when I go to edit one it doesn't have a leading slash to remove. Even if I retype the path it still has a leading slash.

Is there a fix for this problem or should I edit link-display.tpl and .htaccess?

Thanks,
Sol

abatis
10-08-2008, 02:35 AM
having this same issue on some of my catagory links....why is this happening..

paysites4free.com
try the free tube sites section to see the error.

thanks.

-abatis