Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-19 08:43:46

claudio
New Member
Registered: 2005-12-19
Posts: 6

textpattern under https

I do not know if this can be done in a different way: I had to activate a Textpattern site on a
https-only server. Textpattern did not work out-of-the box, and I did not know if there is an
easy way to get this. However, I made this stuff work just by changing the prefix “http” to “https” in
the following lines of code:

./textpattern/setup/index.php: fLabelCell(‘https://’).
./textpattern/setup/index.php: $siteurl = str_replace(“https://”,’‘,$siteurl);
./textpattern/setup/txpsql.php:$create_sql[] = [THE LINE IS VERY LONG, SO I DO NOT PASTE IT]
./textpattern/include/txp_prefs.php: $post[$prefname] = str_replace(“https://”,’‘,$post[$prefname]);
./textpattern/lib/classTextile.php: return preg_replace_callback(“/(?<=^|\s)\[(.)\]((?:https:\/\/|\/)\S)(?=\s|$)/U”,
./textpattern/publish/taghandlers.php: $web = str_replace(“https://”, “”, $web);
./textpattern/publish/taghandlers.php: $name = ‘a href=“https://’.$web.’” title=”’.$web.’”’.(@$txpac[‘comment_nofollow’] ? ‘ rel=“nofollow”’ : ‘’).’‘.$name.’/a’;
./textpattern/publish/atom.php: $url = (preg_replace(“/^\/(.*)/”,“https://$siteurl/$1”,$url));
./textpattern/publish.php: define(“hu”,‘https://’.$siteurl.’/’);
./textpattern/publish.php: define(“rhu”,preg_replace(“/https:\/\/.+(\/.*)\/?$/U”,”$1”,hu));
./textpattern/publish.php: $out[‘subpath’] = $subpath = preg_quote(preg_replace(“/https:\/\/.(\/.)/Ui”,”$1”,hu),”/”);
./textpattern/index.php: define(“hu”,‘https://’.$siteurl.’/’);
./textpattern/index.php: define(“rhu”,preg_replace(“/https:\/\/.+(\/.*)\/?$/U”,”$1”,hu));

Is there an easier way to get the same result?
If there is not, maybe this feature might be easily added in the next releases of Textpattern,
as it might be useful to other people, too. Maybe a configuration variable might be added in config.php, that allows to set the preferred default prefix (http vs. https).

Offline

Board footer

Powered by FluxBB