How to specify base to check relative links in cse?

For technical support for all editions of CSE HTML Validator. Includes bug reports.

How to specify base to check relative links in cse?

Postby rag_gupta » Mon Apr 23, 2012 3:10 am

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>
rag_gupta
Rank II - Novice
Rank II - Novice
 
Posts: 28
Joined: Tue Nov 30, 2010 11:17 pm

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

Postby Albert Wiersch » Mon Apr 23, 2012 4:05 pm

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.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

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

Postby rag_gupta » Tue Apr 24, 2012 12:43 am

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.
rag_gupta
Rank II - Novice
Rank II - Novice
 
Posts: 28
Joined: Tue Nov 30, 2010 11:17 pm

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

Postby Albert Wiersch » Tue Apr 24, 2012 8:50 pm

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
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX


Return to CSE Tech Support

Who is online

Users browsing this forum: No registered users and 2 guests