Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
April 16, 2005, 11:01 pm
rate this thread
I am adding a sponsor feature to my site and am trying to figure out the
best way to do it. The site is very stripped down; no PHP, etc.
I am displaying the sponsors similar to how The Onion does
(http://theonion.com - left column). It is pretty much just a list using a
table. The easiest way I figure it is to keep the html of the table in a
it display an html or an html file dynamically? I know how to make it
display plain text using document.write, but this isn't plain text.
Or is this best done using another method? I don't want to use iframe
because I want search engines to think these ads are part of the page, even
though really it's in a separate file. I assume using iframe it would just
count the links on the same file multiple times.
Thanks for any help.
I can use server side scripting, I just don't really know how. I didn't know
if this could be done with PHP and if it could, how to prepare the files (or
call the file). I can't seem to find any tutorials dealing with this,
pprobably because I don't really know much about it or what it's called to
If anyone could point me to a tutorial or even clue me in as to what I'm
searching for, I'd be most appreciative.
Yes - most (all?) server side scripting languages have the facility to
include one file in another.
Exactly as you would prepare any other part of the document. In fact,
when building a new series of documents I usually start with just one file
and split the commonly used bits out to different files for inclususion at
php has 'include'
search: 'include one file in another'
possibly prefix the search with 'php' or whatever language you intend to
Whatever you do - do something.
That helps - I found exactly what I was looking for. SSI looks like the
easiest way to do this, but I run into a problem - renaming all HTML files
taht would use this to shtml from html. That would be a nightmare not only
to rename the files, but worrying about search engines re-indexing my pages.
Is there a way to do this without having to rename my html files to shtml?
Can something be put in htaccess?
Thanks for that. I found and bookmarked some very useful links.
I got to thinking about it, and while I'm not a htaccess wiz I would guess
that there is something I can put in it to force a client to see the shtml
version of a file if they request the html...for example, if they try to
view www.mysite.com/webpage.html like it is now, and I have renamed it to
webpage.shtml, htaccess could tell them that no, it's
www.mysite.com/webpage.shtml that you want, and display it without giving
any error messages or anything. Am I correct in assuming that? If so, is
there a name for it?
If I did it that way I wouldn't have any html files on the site; they'd all
become shtml files. Not sure if that would make a difference in what I put
I really appreciate this help. Thanks.
> Toby Inkster wrote:
>> Better still, for forwards compatibility, redirect all files to URLs
>> without any extension. Extensions are a bane on URLs.
> I'm not sure what you mean - could you explain?
Redirect "http://example.org/foo.html " to "http://example.org/foo ".
Redirect "http://example.org/foo.shtml " to "http://example.org/foo ".
Put your page at "http://example.org/foo ".
Now in the future you can make the resource at "foo" into an HTML file, or
a SHTML file, or a PHP file or even a PDF file or an MP3 file and you
won't need to ask people to update their links.
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
> Redirect "http://example.org/foo.html " to "http://example.org/foo ".
> Redirect "http://example.org/foo.shtml " to "http://example.org/foo ".
> Put your page at "http://example.org/foo ".
> Now in the future you can make the resource at "foo" into an HTML file, or
> a SHTML file, or a PHP file or even a PDF file or an MP3 file and you
> won't need to ask people to update their links.
My site has 300+ HTML files. With this method it looks like I'd have to put
300 lines worth of redirects in htaccess, correct?
Hi Ian -
>My site has 300+ HTML files. With this method it looks like I'd have to put
>300 lines worth of redirects in htaccess, correct?
Nope. RedirectMatch supports regular expressions. To redirect
everything ending in .html to .shtml with a status code to indicate
that it is a permanent change (301):
RedirectMatch permanent (.*)\.html$ http://www.example.com $1.shtml
- » looking for host where we can run a custom spam filter
- — Next thread in » Webmaster Forum