expressionengine

Trying to password protect a URL with htaccess

会有一股神秘感。 提交于 2019-12-13 05:40:46
问题 I am using Expression Engine 2 Freelancer editon that doesn't have an authentication module. I am trying to password protect a template group that has a virtual directory www.domain.com/template What I am trying to do is use the htaccess in the root to force people to enter a username and password when they try and navigate to the to "template" section and the two files under it. The way that Expression Engine works the templates are routed to and not physical directories. My question is how

Access denied from curl on remoter server

霸气de小男生 提交于 2019-12-13 04:38:31
问题 I'm working on push notification service for android and followed some tutorial for that. I tried to implement the technique in localhost and succeeded. But While I tried with my remote server it is giving me the error "Curl failed: Failed to connect to : Permission denied". I don't know whats the problem with it. I tried looking for solution, but non of them worked. Here is the step how I did. I created a database called GCM for cloud messaging Added the following line of code in publish

https in htaccess and order of rules (using Expression Engine)

天大地大妈咪最大 提交于 2019-12-12 21:12:39
问题 I'm building a site in expression engine that part of needs to be https. The site is also using a new domain name (new one www.example-new.com the old one www.example.old.com). I want to do the following things: remove the index.php force www force https for any url starting www.example.old.com/extranet redirect https URLs that are not www.example.old.com/extranet (e.g. www.example.old.com/news to http I have the following code so far that works for the first two requirements: <IfModule mod

.htaccess not working on live site but working on localhost?

人走茶凉 提交于 2019-12-12 02:03:10
问题 I am using ExpressionEngine and want to remove index.php from my URL's. I have this .htaccess file saved in the root folder. It works perfectly on localhost but when I upload it to the server it doesn't work. The correct URL appears in the address bar but the page stays on homepage. Any tips? <IfModule mod_rewrite.c> # Enable Rewrite Engine # ------------------------------ RewriteEngine On RewriteBase / # Redirect index.php Requests # ------------------------------ RewriteCond %{THE_REQUEST}

Last 2 letters of the uri defining the used language

你离开我真会死。 提交于 2019-12-11 14:44:21
问题 <?php $pageurl = "http://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; $pageurl_noslashes = str_replace("/","",$pageurl); $lang = substr($pageurl_noslashes,-3); echo $lang; ?> {exp:channel:entries channel="products" limit="10"} <p>Product title: <span>{if title<?php echo $lang; ?>} {title<?php echo $lang; ?>} {if:else} {title} {/if}</span></p> {/exp:channel:entries} I am hacking expression engine to return the appropriate language variables. I am aware that the way I am getting the

Process Tags in Plugin

给你一囗甜甜゛ 提交于 2019-12-11 12:25:21
问题 I have an Expression Engine plugin that has a file parameter for example: {exp:my_plugin file='/css/css.js'} I can get the parameter in the plugin using $file = $this->EE->TMPL->fetch_param('file'); Is there a way to process $file to replace any tags, i.e. global variables and snippets, so that I could do something like: {exp:my_plugin file='{global_path}/css.js'} And have {global_path} be replaced with the value of global path? 回答1: In your plugin, you can parse the parameter to match global

ExpressionEngine (CMS) with SQLite

南楼画角 提交于 2019-12-11 08:28:03
问题 Has anyone out there hacked up ExpressionEngine (CMS) to work with SQLite? If so, any good tips or guides on how to do so? 回答1: I don't know of any Expression Engine 1.6 that has been modified to support SQLite; however, the next version (2.0) is based on the CodeIgniter framework which has a DAL which supports many databases. Here is a post from an Ellis Labs employee confirming this. 回答2: Given that it's proprietary software under copyright and not available (so far as I can tell) under an

Expressionengine tags inside php

删除回忆录丶 提交于 2019-12-11 06:07:18
问题 In expressionengine with php parse enabled, if i do the following, it works and i get the username displayed. logged in user is admin. So it echos out admin. <?php $x = '{username}'; echo $x; ?> However if i do the following and use the{username} tag insde mkdir() function, then it doesn't work. The directory created will have the name {username} instead of admin. Why is this happening. <?php $x = '{username}'; mkdir($x); ?> 回答1: I'd suggest writing a quick plugin that accepts the logged-in

How to add a .xml extension to a specific URI using .htaccess

帅比萌擦擦* 提交于 2019-12-11 04:24:01
问题 I have a URL at the moment www.mydomain.com/feed/my_feed/ which writes out an xml document to be read by a third party. The XML document is dynamically generated (I'm using ExpressionEngine). The third party have requested that it must have a .xml extension to be read. Any ideas how I could set up a .htaccess rule to only use a .xml file extension for this particular uri? Most tutorials are concerned with removing file extensions adding file extensions to all urls, which doesn't help a

More efficient ExpressionEngine server moves

大城市里の小女人 提交于 2019-12-11 02:38:35
问题 I'm trying to find a better way to move my Expression Engine 2 sites from development to live servers. I have a checklist that I go through, starting with running a find and replace for the old/new URLs and server paths, then I update the database config file. This however misses out a huge amount of settings that I then have to go through and change manually, but I don't see why I should need to (unless these are encrypyed somewhere). For example, I have to change the "Basepath to Template