Page 1 of 1

How to specify base to check relative links in cse?

PostPosted: Mon Apr 23, 2012 3:10 am
by rag_gupta
I understand we can use base property in the html document. But I work on CMS only and all my html pages are without <html> or <body> tags.
I've made the changes as below and restarted the CSE but relative link checking starting with index.php are not working.

I want to change this url :
Code: Select all
href="index.php?option=com_content&amp;view=article&amp;id=150034:download-all-lic-forms&amp;catid=150004" class="MainPageNav"


to
Code: Select all
href="http://www.downloadformsindia.com/index.php?option=com_content&amp;view=article&amp;id=150034:download-all-lic-forms&amp;catid=150004" class="MainPageNav"


So in linkcheckercfg.xml I added this:
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<linkcheckercfg>
 <pathmapcfgset>
  <pathmapcfg basebeginswith="index.php" mapto="http://www.downloadformsindia.com/index.php" />
 </pathmapcfgset>
</linkcheckercfg>

Re: How to specify base to check relative links in cse?

PostPosted: Mon Apr 23, 2012 4:05 pm
by Albert Wiersch
Hello,

I think you want something more like the following:

If index.php is in "C:\webfiles\", then you should use something like this instead:
Code: Select all
<pathmapcfg basebeginswith="C:\webfiles\" mapto="http://www.downloadformsindia.com/" />


This may help further:
http://www.htmlvalidator.com/htmlval/v1 ... g_node.htm

The "basebeginswith" attribute is designed to specify a folder or directory. I hope this helps.

Re: How to specify base to check relative links in cse?

PostPosted: Tue Apr 24, 2012 12:43 am
by rag_gupta
Before posting I already gone through the documentation and tried the syntax.
Now is the time for CMS based sites, but the documentation talks only about checking (old age era) html pages existing on disk.
I wonder if I can do such a basic & simple check using CSE.

Re: How to specify base to check relative links in cse?

PostPosted: Tue Apr 24, 2012 8:50 pm
by Albert Wiersch
rag_gupta wrote:Before posting I already gone through the documentation and tried the syntax.
Now is the time for CMS based sites, but the documentation talks only about checking (old age era) html pages existing on disk.
I wonder if I can do such a basic & simple check using CSE.


Sure, you can check http and https links too.

You can create your own target list files with URLs from your CMS, if you find that a good way to check pages. Here is more information:
http://www.htmlvalidator.com/htmlval/v1 ... format.htm
http://www.htmlvalidator.com/htmlval/v1 ... ormats.htm