How to specify base to check relative links in cse?

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
rag_gupta
Rank II - Novice
Rank II - Novice
Posts: 28
Joined: Tue Nov 30, 2010 10:17 pm
Contact:

How to specify base to check relative links in cse?

Post by 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&view=article&id=150034:download-all-lic-forms&catid=150004" class="MainPageNav"
to

Code: Select all

href="http://www.downloadformsindia.com/index.php?option=com_content&view=article&id=150034:download-all-lic-forms&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>

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3451
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

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

Post by 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

rag_gupta
Rank II - Novice
Rank II - Novice
Posts: 28
Joined: Tue Nov 30, 2010 10:17 pm
Contact:

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

Post by 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.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3451
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

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

Post by 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

Post Reply