Latest Register Log In

+ Advanced Search

Dealing with path differences: base directory vs. /admin/

Dealing with path differences: base directory vs. /admin/
By
Nov 04, 2003 (Edited Mar 10, 2014)

When you use a relative link, like <a href="https://scripts.webmastersite.net/wsnlinks/manual/">index</a>, it may not go where you expect if the template or language item is used in both the admin panel and the user side. If this is an issue (as it may be in the edit listing, submit listing, etc templates), make it into an absolute url like this: <a href="{DIRURL}/index.php">index</a>. {DIRURL} stands in for your site's base url. To link to the admin directory's index, use <a href="{DIRURL}/{ADMINDIR}/index.php">index</a>.

This can also be important for URL rewriting, when you have pseudo-subdirectories you may be in, though WSN will normally auto-absolutize your links when rewriting is on.




Description Effectively write your templates to look the same whether viewed from your base directory or from the admin directory.
Rating
Views 2,049 views. Averaging 0 views per day.
Similar Listings