Re: Moving a Web site from IIS to httpd

2017-08-31 Thread BergenBergen BergenBergen
I wish migrating from Rails Nginx to Rails httpd would be that easy. Seems
now I have to pay the uwsgi team hundreds of dollars to come up with a
config for me.

If anybody wishes to join me in paying for this config so we can create an
online tut do feel free to let me know.

All the best,
Murk


On Thu, Aug 31, 2017 at 11:04 PM, Jesper Wallin  wrote:

> On Thu, Aug 31, 2017 at 07:20:16PM +, Peter Fraser wrote:
> >
> > It would be nice if httpd could be used to convert or ignore case in
> URL's.
>
> Hi Peter,
>
> First of all, from an SEO standpoint, you shouldn't ignore the case in
> URL's, as you end up with duplicate content. Pick a certain naming style
> and use it everywhere on your site.
>
> Your best luck is to check your logs for incorrect links. Then simply
> add a "location" block for every link and redirect it to the correct one
> using a "block return 301". Be sure to use the 301 (Permanently moved)
> to tell clients not to use the old URL anymore.
>
> server "domain.tld" {
> listen on * port 80
>
> location "/FOOBAR.HTML" {
> block return 301 "http://domain.tld/foobar.html;
> }
> }
>
> You can probably make this a bit more universal using patterns(7) for
> the locations block. Also, the example above is more or less copied from
> httpd.conf(5).
>
>
> Another alternative, like you said, is to create a copy of the page. To
> prevent duplicate content and let clients know where your "real" page
> is, use a link canonical tag. E.g,
>
> http://domain.tld/foobar.html;>
>
> However, this won't solve the issue with others linking to the wrong
> pages and it will probably be a real pain to maintain your site.
>
>
> Jesper Wallin
>
>


Re: Moving a Web site from IIS to httpd

2017-08-31 Thread Jesper Wallin
On Thu, Aug 31, 2017 at 07:20:16PM +, Peter Fraser wrote:
> 
> It would be nice if httpd could be used to convert or ignore case in URL's.

Hi Peter,

First of all, from an SEO standpoint, you shouldn't ignore the case in
URL's, as you end up with duplicate content. Pick a certain naming style
and use it everywhere on your site.

Your best luck is to check your logs for incorrect links. Then simply
add a "location" block for every link and redirect it to the correct one
using a "block return 301". Be sure to use the 301 (Permanently moved)
to tell clients not to use the old URL anymore. 

server "domain.tld" {
listen on * port 80

location "/FOOBAR.HTML" {
block return 301 "http://domain.tld/foobar.html;
}
}

You can probably make this a bit more universal using patterns(7) for
the locations block. Also, the example above is more or less copied from
httpd.conf(5).


Another alternative, like you said, is to create a copy of the page. To
prevent duplicate content and let clients know where your "real" page
is, use a link canonical tag. E.g,

http://domain.tld/foobar.html;>

However, this won't solve the issue with others linking to the wrong
pages and it will probably be a real pain to maintain your site.


Jesper Wallin



Moving a Web site from IIS to httpd

2017-08-31 Thread Peter Fraser
The move was no trouble and simple except of one problem.

I originally moved the files as is to OpenBSD, but the web site at times 
referred to
files using different cases and those references failed, and since IIS ignores 
the case
in filenames there was no problem.

I then lower cased all the file names on OpenBSD, and made all the references
consistently use the lower case name. This fixed the problem with use of the web
site, but there is still the problem of external references that have saved 
URL's
with differing cases.

I could figure out no way to convert the names using HTTPD. My interim 
mitigation
is to create multiple copies of the most used  files with case distinctions  in 
the
web site, the files just redirect to the lower case versions.

It would be nice if httpd could be used to convert or ignore case in URL's.