I have SEO links working but have a problem with links which are created manually. I have a news object and a comment object, on the news detail page the registered customer can post a comment relating to the news item. When the comment is posted the object ID of the news item is registered in the comment object to allow a return link to be created. The reason for wanting a NON-SEO link is to ensure the comment remains linked to the news item if the title changes.
How do I set up my .htaccess file to work with the manually constructed links as illustrated in the code below?
1. Create the comment object including the NON-SEO link as well as the SEO link:
Code: Alles auswählen
<?php $url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?>
<we:object objectseourls="true">
<?php $post_oid = $GLOBALS['we_obj']->ID; ?>
</we:object>
<we:form type="object" id="25" name="comment" method="post" target="_self" categories="/News" classid="3" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="we_ui_comment[Comment_UID]" value="<we:sessionField type="print" name="ID" />">
<input type="hidden" name="we_ui_comment[Comment_Username]" value="<we:sessionField type="print" name="Username" />">
<!-- NON-SEO link -->
<input type="hidden" name="we_ui_comment[Comment_Post_OID_URL]" value="/<we:path hidehome="true" />?we_objectID=<?php echo $post_oid; ?>">
<!-- SEO link -->
<input type="hidden" name="we_ui_comment[Comment_Post_URL]" value="<?php echo $url; ?>">
<p class="textarea"><we:userInput type="textarea" name="Comment_Body" autobr="true" hideautobr="true" /></p>
<p class="submit"><input type="submit" value="Submit" /></p>
</we:form>
Code: Alles auswählen
<we:condition name="condition">
<we:conditionAdd field="Comment_UID" compare="=" var="ID" type="sessionfield" exactmatch="true" />
</we:condition>
<we:listview type="object" name="Comment_Listview" order="we_published" desc="true" classid="3" condition="\$condition" objectseourls="true" hidedirindex="true">
<we:repeat>
<a href="<we:field name="Comment_Post_OID_URL" />">link</a>
<we:repeat>
</we:listview>