Anchors leading to front page with SEF enabled

Discuss Search Engine Optimization in relation to Joomla!. This forum will also have discussions on SEF/SEO Joomla! extensions.

Moderator: General Support Moderators

Locked
canardesign
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Oct 27, 2014 11:10 am
Contact:

Anchors leading to front page with SEF enabled

Post by canardesign » Mon Oct 27, 2014 11:50 am

Hi, I'm having trouble with anchors links in a chronoform. I posted on their forum but they told me it was no CF problem but actually related to SEF.
SEF is ON, Apachemod_rewrite is ON, both working as expected. Url suffix is OFF. .htaccess is ok with

Code: Select all

RewriteBase /ecovolontariat
as the website is in a subfolder.
I created a Chronoform and set the result content with chrono connectivity component. I need to make links to anchors in that same page
the code looks like this :

Code: Select all

<p>
<a href="#1">Présentation - </a>
<a href="#2">Localisation - </a>
<a href="#3">Habitat - </a>
<a href="#4">Espèces - </a>
<a href="#5">implication - </a>
<a href="#6">Déroulement - </a>
<a href="#7">Hébergement - </a>
<a href="#8">Langue utilisée - </a>
<a href="#9">Exigences - </a>
<a href="#10">Contraintes - </a>
<a href="#11">Conditions pour les mineurs - </a>
<a href="#12">Informations de voyage - </a>
<a href="#13">Dates et tarifs - </a>
<a href="#14">S'inscrire</a>
</p>
</div>
</div>
<p><h3 id="1">Présentation <a name="presentation" title="presentation"></a>
</h3>
<div class="justify">{description}</div>
</p><br><br>

<p><h3 id="2">Localisation <a name="localisation" title="localisation"></a></h3>
<div class="justify">{localisation}</div>
</p><br><br>

<p><h3 id="3">Habitat <a name="habitat" title="habitat"></a></h3>
<div class="justify">{habitat}</div>
</p>
etc...
the current URL is :

Code: Select all

http://www.myDomain/ecovolontariat/component/chronoconnectivity?connectionname=detailprojet&Itemid=59
links urls get rewritten as

Code: Select all

http://www.myDomain/ecovolontariat/#1
and of course lead to front page. As you understand, I would like to target the anchor in current page. I tried with

Code: Select all

href="index.php?option=com_chronoconnectivity&connectionname=detailprojet&Itemid=59#1
but it gets rewritten as

Code: Select all

http://www.myDomain/ecovolontariat/component/chronoconnectivity/?connectionname=detailprojet#1
which obviously doesn't work...
I saw on different forums this was a common problem but found nothing that helps.
Am I missing something ?

 
User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: Anchors leading to front page with SEF enabled

Post by dpacadmin » Mon Nov 03, 2014 12:46 am

Have a look at this explanation;
https://www.[youtube].com/watch?v=U01EFpRXSIU

Lets look at your first anchor;

Code: Select all

<p>
<a href="#1">Présentation - </a>

</p>
</div>
</div>
<p><h3 id="1">Présentation <a name="presentation" title="presentation"></a>
</h3>

etc...
The link to the anchor should look like this

Code: Select all

<a href="#presentation">Présentation - </a>

</p>
</div>
</div>
<p><h3 id="1">Présentation <a name="presentation" title="presentation"></a>
</h3>
The anchor tag name is the anchor for the link not the #ID of the H3 tag.

 

Locked

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 1.5”