I am trying to set up rewrites in Netlify.
I have generated directories for each countries, so I can access mydomain.com/fra
Now i want to hiding country path to mydomain.com, but accessing mydomain.com/fra
Can I do that in Netlify?
Thank you in advance.
Check this -> https://docs.netlify.com/routing/redirects/redirect-options/#redirect-by-country-or-language
netlify.toml example
[[redirects]]
from = "/*"
to = "/fra/:splat"
status = 200
force = true
conditions = {Country = "fra"}
Related
I'm trying to use swift with keystone authentication. I followed this link https://docs.openstack.org/swift/latest/overview_auth.html#keystone-auth to edit my proxy-server.conf but I noticed that at the bottom of the file [filter:authtoken] is already there, while in the comments section I can uncomment a section with the same name of [filter:authtoken], right now the bottom part looks like this:
[filter:authtoken]
include_service_catalog = False
cache = swift.cache
delay_auth_decision = 1
memcached_servers = localhost:11211
cafile = /opt/stack/data/ca-bundle.pem
project_domain_name = Default
project_name = service
user_domain_name = Default
password = 1234
username = swift
auth_url = http://10.180.204.223/identity
interface = public
auth_type = password
What should I do with it? Should I keep it, modify it according to the link, or should I uncomment the section and add the code according to the link?
I am writing an app where I would like to set the ACL for a created object to allow for public writing (there is an issue where deleting the object, which is what I want to do, can only be done if public write is set to true). I have seen several similar questions that have been answered like:
let acl = PFACL()
acl.setPublicReadAccess(true)
acl.setPublicWriteAccess(true)
yourObject.ACL = acl
However, the .setPublicWritAccess(bool) no longer seems to be the correct syntax. I tried to do it similarly with:
acl.setWriteAccess(true, for: "Public")
but this did not work. Does anyone know how to do this appropriately?
From Parse's documentation it seems that publicWriteAccess and publicReadAccess are instance properties. So, this should work:
let acl = PFACL()
acl.publicReadAccess = true
acl.publicWriteAccess = true
yourObject.ACL = acl
See more details here.
As of Parse iOS SDK 1.14.3:
let acl = PFACL()
acl.getPublicReadAccess = true
acl.getPublicWriteAccess = true
object.ACL = acl
I've a custom database table. I want to index the records of the table by
language specific. I've created a crawler configuration named "customindex"
and created a Indexer Configuration named "Data Indexer".
In my website, there are two languages: 0 - Deutch (Default) and 1- English.
But in frontend I can see both Deutch and English records in default
language search. I've investigated with this and I saw a
configuration "tx_crawler.crawlerCfg". (
http://docs.typo3.org/typo3cms/extensions/crawler/ExtCrawler/Configuration/PageTsconfigReference(txCrawlercrawlercfg)/Index.html).
And I don't understand the key parameter here "paramSets.[key]". What is
the "key" actually indicated here? Is it extension key or crawler
configuration name?
I wrote a Page TS config like this;
tx_crawler.crawlerCfg.paramSets.key =
&tx_myext_myext[uid]=[_TABLE:tx_myext;_PID:22;_WHERE:AND
(sys_language_uid=0)]
tx_crawler.crawlerCfg.paramSets.key {
baseUrl = http://www.example.com/
cHash = 1
pidsOnly = 22
procInstrFilter = tx_indexedsearch_reindex
}
# A second tx_tour configuration for another language with language ID 1
tx_crawler.crawlerCfg.paramSets.key =
&tx_myext_myext[uid]=[_TABLE:tx_myext;_PID:22;_WHERE:AND
(sys_language_uid=1)]&L=1
tx_crawler.crawlerCfg.paramSets.key {
baseUrl = http://www.example.com/
cHash = 1
pidsOnly = 22
procInstrFilter = tx_indexedsearch_reindex
}
But I don't know what is that "key" (tx_crawler.crawlerCfg.paramSets.key)
indicated here.
Can you guys please help me to find what is that "key" here?
"Key" will be any variable name we need to use as crawler configuration.
I need to the routing URL like the following
http://www.website.com/module-name/controller-name/{article-name}/{article-id}
i tried using the routes.ini file but it's not working
routes.index-latest.route = "index/latest/$1/:id"
routes.index-latest.module = "index"
routes.index-latest.defaults.controller = "latest"
routes.index-latest.defaults.action = "index"
routes.index-latest.defaults.id = ""
can you anyone suggest me on the issues or please tell me any other way to achieve the URL like through bootstrap file.
i searched on the net but i am not getting the right solution.
i fixed myself like example #
routes.index-latest.route = "index/latest/:article_id"
routes.index-latest.defaults.module = "module-name"
routes.index-latest.defaults.controller = "controller-name"
routes.index-latest.defaults.action = "action-name"
routes.index-latest.defaults.article_id = ""
routes.index-latest.defaults.reqs.article_id = "\d+{1,}"
in routes.ini
I used this function to start a form:
echo form_open('email/send');
and after viewing the source I found that form_open returned duplicated index.php :
<form action="http://localhost/ci/index.php/index.php/email/send"
Note:
I tried keeping only this line of code in the page, but still gave me the same result
Edit1:
Base url : $config['base_url'] = 'http://localhost/ci/index.php/';
What is your index_page configuration item set to? If your base_url and index_page configuration items both include "index.php" then I imagine form_open() would duplicate it.
Change your application/config/config.php to:
$config['base_url'] = 'http://localhost/ci/';
//...
$config['index_page'] = 'index.php';