Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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.
Offline
Re: Site URL doesn't work like I think it should
I forgot about .htaccess. Yes, that would fix it. Thanks!
Offline
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
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
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
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
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
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
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