subdomain

Setting up sub domain include filter in google analytics

妖精的绣舞 提交于 2019-12-24 18:26:43
问题 I am trying to set up a sub domain include filter in google analytics. I am a little confused about how to write the filter pattern for my sub domain which is going to be www.somesite.com/de All of the tutorials show it set up like this: sub1.website.com. but my url structure is different. Am I missing the point here any help appreciated. Here is a screen of what I am trying to set up: 回答1: You'll need two separate filters to accomplish this. Hostname : The full domain name of the page

Redirect website to another website if blocked in particular region

心不动则不痛 提交于 2019-12-24 15:42:37
问题 One of my client website is blocked in UAE, how can I redirect UAE users to another website if current website is blocked? for example: www.abc.com is accessible to the world but not UAE. I want UAE users to redirect to another website (i.e. www.xyz.com) if www.abc.com is blocked in their region. 来源: https://stackoverflow.com/questions/30782825/redirect-website-to-another-website-if-blocked-in-particular-region

Cookies And Subdomain

前提是你 提交于 2019-12-24 11:08:56
问题 There is a website with several subdomains. On the main subdomain cookies are set: @setcookie( $name, $value, $expires, '/', '.www.mysite.com'); I can see the cookie on www.mysite.com and sub1.mysite.com. The directories are: www.mysite.com: public/index.php sub1.mysite.com: public/sub1/index.php How can that be possible that I can't see it in the new subdomain sub2.mysite.com? sub2.mysite.com public/sub2/index.php 回答1: Setting the domain to 'www.example.com' or '.www.example.com' will make

Mapping Subdomains to Areas in ASP.Net Core 3

半城伤御伤魂 提交于 2019-12-24 10:55:51
问题 What I want to achieve Mapping my normal domain e.g. example.com to no area if possible. Mapping my subdomain e.g. blog.example.com to a area named blog . What I have found There are actually quite a lot of posts regarding to this topic, especially mapping subdomains to areas. From SO: area-and-subdomain-routing asp-net-core-mapping-subdomains-to-areas Others: danylkoweb.com benjii.me web.archive.org And there are probably even more. Problem But there is one big problem, in ASP.Net Core 3

.htaccess : Rewriting initial output back into subdomain

删除回忆录丶 提交于 2019-12-24 10:35:14
问题 I have the following htaccess. Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} !^(www|m)\.DOMAIN\.com$ RewriteCond %{HTTP_HOST} ^([^\.]+).DOMAIN.com$ RewriteRule ^(.*)$ http://DOMAIN.com/index.php?id=%1 [NC,QSA,L,R=301] The problem is that although it works I need it to still use the subdomain as the URL. So basically now I'm trying to rewrite DOMAIN.com/index.php?id=%1 back into SUDOMAIN.DOMAIN.com so the user sees the subdomain they requested on the address

.htaccess rewrite wildcard subsubdomain and params

本小妞迷上赌 提交于 2019-12-24 06:42:05
问题 I'm trying to write a mod_rewrite to work like this wildcard.subdomain.domain.com => subdomain.domain.com/data.php?q=wildcard wildcard.subdomain.domain.com/?repeat=1 => subdomain.domain.com/data.php?q=wildcard&repeat=1 subdomain.domain.com => data.php www.subdomain.domain.com => data.php What I've done so far in my .htaccess <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} ^([^.]+)\.abc\.def\.com\.br$ [NC] RewriteCond %1 !^(www)$ [NC] RewriteRule ^.*$

Need regex to get domain + subdomain

萝らか妹 提交于 2019-12-24 06:19:23
问题 So im using this function here: function get_domain($url) { $pieces = parse_url($url); $domain = isset($pieces['host']) ? $pieces['host'] : ''; if (preg_match('/(?P<domain>[a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i', $domain, $regs)) { return $regs['domain']; } return false; } $referer = get_domain($_SERVER['HTTP_REFERER']); And what i need is another regex for it, if someone would be so kind to help. Exactly what i need is for it to get the whole domain, including subdomains. Lets say as a

Simple subdomain redirect PHP

↘锁芯ラ 提交于 2019-12-24 05:15:06
问题 I have a sub-domain for my mobile app which is like http://m.traffic.domain.com now I want that my users can access their page by visiting http://m.traffic.domain.com/username which will internally point to http://m.traffic.domain.com/index.php?username=$1 for this I have following .htaccess rewrite code but its not working as expected rather its redirecting all pages to http://m.traffic.domain.com/index.php?username=$1 this page # Use PHP5 Single php.ini as default AddHandler application/x

check/upload images to domain folder from subdomain

ε祈祈猫儿з 提交于 2019-12-24 03:38:14
问题 I have domain www.mysite.com and subdomain api1.mysite.com. There (in domain) are several folders and folder "images". There also is a folder called api1 which is subdomain's folder. What I can't figure out, is how to locate from subdomain a domian's folder "images" and upload files there or check if they exist. I'm using php. e.g. this line is located in one of the files in subdomain folder and "images" folder is one level up - in domain folder. $dir_img_small = file_exists('images/users

Htaccess rules for dynamic sub domain conflicting for index file

五迷三道 提交于 2019-12-24 00:46:36
问题 Here is my htaccess file Options +FollowSymLinks RewriteEngine on # For Accessing Page http://www.domain.com/news/news-details.php RewriteCond %{HTTP_HOST} ^www.domain\.com$ [NC] RewriteRule ^news/news-details.php$ news.php [QSA,NC,L] # For www.domain.com it should go to the index page RewriteCond %{HTTP_HOST} ^(www\.)?domain.com$ [NC] RewriteRule ^(.*)$ index.php [NC,L] when i type http://www.domain.com/news/news-details.php in the browser it takes me to the index.php page rather than news