Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-05-14 17:13:43

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 100
Website

Site URL doesn't work like I think it should

Site URL doesn’t seem to be working the way I think it should on my new site. I have the site URL as

   198.252.106.70/~skewrayc

The resulting link for

   !/images/10t.jpg (description)!:/images/10.jpg

links to

   198.252.106.70/images/10.jpg

which is wrong. I do get the diagnostic errors:

   DNS lookup failed: 198.252.106.70
   Clean URLs are only supported on Apache, use at your own risk.

but I don’t know what those really mean.

Offline

#2 2017-05-14 18:14:01

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,038
Website

Re: Site URL doesn't work like I think it should

skewray wrote #305694:

Site URL doesn’t seem to be working the way I think it should on my new site. I have the site URL as

198.252.106.70/~skewrayc...

The resulting link for

!/images/10t.jpg (description)!:/images/10.jpg...

links to

198.252.106.70/images/10.jpg...

which is wrong. I do get the diagnostic errors:

DNS lookup failed: 198.252.106.70...

but I don’t know what those really mean.

Are you testing in a windows machine? If so check out this link

Temporary fix: you could use:

   !/~skewrayc/images/10t.jpg (description)!

Yiannis
——————————
neme.org | hblack.net | LABS | NeMe @ github

Offline

#3 2017-05-14 19:26:19

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 100
Website

Re: Site URL doesn't work like I think it should

The machine is some sort of Redhat derivative.

I suppose I could dump the database, do a global search and replace, and then upload it again. There are maybe a hundred references to be hacked that way. I’d rather find a fix at this point.

I could replace all of the image references with txp:image references instead, but I don’t know the exact syntax. What would the above reference be in txp syntax?

Last edited by skewray (2017-05-14 19:37:53)

Offline

#4 2017-05-14 19:45:12

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,053
Website

Re: Site URL doesn't work like I think it should

I don’t think Textile takes the Site URL (the one configured in Textpattern settings) into consideration.
Also, DNS isn’t related at all with causing this issue, even if clean URLs aren’t working properly in your local setup.

The output you get (198.252.106.70/images/10.jpg) is the correct one for the Textile you are using (!/images/10t.jpg (description)!:/images/10.jpg).

I’d suggest a site-wide fix via .htaccess, doing an internal rewrite or a redirect. This will save you from tinkering with the database.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2017-05-14 19:48:26

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 100
Website

Re: Site URL doesn't work like I think it should

I forgot about .htaccess. Yes, that would fix it. Thanks!

Offline

#6 2017-05-15 06:32:53

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,038
Website

Re: Site URL doesn't work like I think it should

maniqui wrote #305698:

I’d suggest a site-wide fix via .htaccess, doing an internal rewrite or a redirect. This will save you from tinkering with the database.

Would this be: RedirectMatch 301 ^/images/?(.+)?$ http://198.252.106.70/~skewrayc/images/$1 ?


Yiannis
——————————
neme.org | hblack.net | LABS | NeMe @ github

Offline

#7 2017-05-16 02:53:15

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 100
Website

Re: Site URL doesn't work like I think it should

colak wrote #305701:

Would this be: RedirectMatch 301 ^/images/?(.+)?$ http://198.252.106.70/~skewrayc/images/$1 ?

This syntax doesn’t appear to work. I had a happy moment when I thought it did, and then realized that I was on the old site.

I expect several hours of Apache manual reading in my future, since I can’t remember this stuff.

Offline

#8 2017-05-16 05:58:01

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,038
Website

Re: Site URL doesn't work like I think it should

You could try

RewriteEngine on
RewriteRule ^/images/(.*)$ http://198.252.106.70/~skewrayc/images/$1 [R=301,L]

Yiannis
——————————
neme.org | hblack.net | LABS | NeMe @ github

Offline

#9 2017-05-16 14:09:41

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 100
Website

Re: Site URL doesn't work like I think it should

colak wrote #305716:

You could try

RewriteEngine on...

This doesn’t appear to work either. Odd. The links are unchanged.

Offline

#10 2017-05-16 17:12:05

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,038
Website

Re: Site URL doesn't work like I think it should

This one?

RedirectMatch 301 /images/(.*) http://198.252.106.70/~skewrayc/images/$1

and here is another method

RewriteRule ^subdirectory/(.*)$ http://198.252.106.70/~skewrayc/images/$1 [R=301,NC,L]

Last edited by colak (2017-05-16 17:18:28)


Yiannis
——————————
neme.org | hblack.net | LABS | NeMe @ github

Offline

Board footer

Powered by FluxBB