Go to main content

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: 279
Website Mastodon

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: 9,398
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

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

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
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
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: 279
Website Mastodon

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: 9,398
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

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

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: 9,398
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

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

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: 9,398
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#11 2017-05-16 17:32:06

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,398
Website GitHub Mastodon Twitter

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

I just thought of another idea.

If you go to Admin>Preferenes>Admin there should be a field in there for images. Make sure that the field just contains: images


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#12 2017-05-17 02:05:59

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

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

None of these appear to work. I do get images if I use a <txp:…> reference. The same thing happens with cgi-bin, /articles/…, and so on. Time to make another support ticket, I guess.

Offline

#13 2017-05-17 21:28:28

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,239
Website GitHub

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

In the other thread, it says your server is Litespeed not Apache. I’m not familiar with it but it is supposed to offer Apache parity (along with a special built-in caching mechanism that might have been the source of your other problem) – also for htaccess. There do seem to be numerous htaccess queries in connection with Litespeed, though.

Perhaps you need to first ascertain if htaccess rewriting works at all. Also, see if there’s a way to turn on rewrite logging so you can debug what’s happening.

Final idea: what I normally do when testing a site is set up a subdomain such as test.domain.com or v2.domain.com etc. and then point that to the directory with the new installation. That way you don’t need to deal with the installation in a subdirectory problem at all.


TXP Builders – finely-crafted code, design and txp

Offline

#14 2017-05-28 17:13:48

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

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

As far as I can tell, none of these redirects work because the .htaccess file would need to be in the folder above mine on the server. However, on the suggestion from HawkHost, I successfully tested my site by redirecting my own machine by adding an entry for the domain into /etc/hosts.

Offline

Board footer

Powered by FluxBB