We have just created a Yammer Account and the link to our account is link this https://www.yammer.com/mydomain.org.uk/
I want to hide the word Yammer.com and mask it with the word social so the domain will look life this.
social.mydomain.org.uk
So If someone will open social.mydomain.org.uk it will show https://www.yammer.com/mydomain.org.uk/ but the address will be masked by social.mydomain.org.uk
I'm not very technical but I know how to change DNS and can upload htaccess file if someone can kindly tell me what exactly am I suppose to write in the file.
you can't solve this problem with htaccess.
one workaround would be to install a index.html with a html-frameset in it, which points the browser to yammer.com/… (example here: http://www.quackit.com/html/templates/frames/frames_example_2.html, you need to adapt the example a little bit)
caveat for this solution: you can't copy a deep url from the browser address bar and i don't know if yammer.com permits this solution.
htaccess would not be the best tool for this job. You can take it up steam to the dns level and throw a 302 or Web forwarding rule which most registrars will let you do from their interface with a CNAME.
HTHs
//P
Related
Sorry if the question will seem little fuzzy and you will be tempted to down-vote it as soon as you read it. I am far from being an expert in system administration but I will try to explain the problem as clearly as I can.
I need to create a website where users can have profiles and attach an external domain to their profile page on this site. Let's say we have a site:
myresume.com
User will register and create a profile and his url will look like:
myresume.com/username
The feature I need to add should enable user to point his domain to his profile url.
Is it possible via php as my whole application will be written in laravel 5.2?
I will probably need to have my nameservers or just give user the IP address which he needs to point his domain to but then I will need to fetch the domain from my side somehow and point it to the url (myresume.com/username). How can it be done?
If someone could give an explanation how it is done or at least point where to search for an answer it would be amazing. Thanks.
You need to know how Apache NGINX works.
You need to know what $_SERVER['HOST'] is.
Logic to implement this.
This is how you will do it:
Host your app on a VPS / dedicated where your app is the 'default' with no other VirtualHost.
On your index.php file, define URL. If URL is set, let your Laravel's route choose which profile_id is matched with URL and then redirect the user to that URL or render the output.
Simple?
I am looking for a solution for my project but I don't know if I chose a correct title for my question, so I should apologise everybody if it doesn't seem relevant somehow.
I have an application written by PHP which is like this: http://app.mysite.com.
What is happening in this app is that customers come and open an account for themselves. They will use this application to get in touch with their own clients in this way that they register their clients in this application and they can communicate with them. So it is somehow important that after their signup for the service, their company's name be shown in the address bar like this: http://TheirFrimName.mysite.com so their clients can identify that they are connecting to the correct path.
What I am looking for is to find a solution that I have only my application under app.mysite.com and when a client signs up, it creates a subdomain with their firm's name and then it redirects to my application path, but the address in address bar should remain with their subdomain address like TheirFirmName.mysite.com.
I don't want to stick to this idea, so if somebody has a better solution I appreciate if they want to share with me, otherwise, I humbly ask people who know how to perform what is in my mind.
I am setting up a SaaS application written in PHP. Now every user gets a subdomain.appname.com where subdomain is user's choice. So there can be subdomain1.appname.com, subdomain2.appname.com and so on.
I have setup the CNAME entry too as a user's domain so that subdomain1.customerdomain.com points to subdomain1.appname.com and when I try subdomain1.customerdomain.com it perfectly loads the subdomain1.appname.com with subdomain1.customerdomain.com in the address bar.
As soon as I hit any link in the app, the domain in the address bar changes to subdomain1.appname.com which is obvious because there is no htaccess rule yet. And that's where I need help..I suck at htaccess, so what should be the htaccess file like to handle domain masking and keeping user's domain in the address bar all the time.
No, the problem here is not .htaccess, the problem are the links.
The application must output all links using the hostname actually used in the URL. It must not use a fixed application URL, but determine it dynamically.
I am trying to implement a website which among other things, let users invite other users to specific pages. Unfortunately the link address of those pages are fairly long, and often cross the 70 characters limit. SO when I add them to the mail, even if I start a new line before the link, still the link address is cut halfway, and then the email client (gmail, for example) assumes the link ends at the end of the line. SO when the user clicks on the link, they experience it as broken.
I am coding all this in PHP, but the problem seem to be general.
What is the standard solution to this problem?
Place the URL in <> brackets. Most mail clients will parse the URL correctly and make it clickable, even when wrapped.
<http://www.somereallylongdomain.com/somereallylongdirectory/somereallylongfilename.html>
You could use a URL shortener to redirect to the longer links. Bit.ly has an API with which your code can interface for this purpose.
I don't know if there are better solutions, but you can implement a url shortener with http://yourls.org/ or with other tools...
Create your own URL shortening solution. There are several ways you can go, depending on the complexity of your requirements:
if you're using only a few selected urls which are always repeating, use apache rewrite
if the url is user specific or changes in other ways from case to case, use a database table that stores a short url and the original url
if you don't want or can't implement your own solution, use an existing url shortening service via an API, but make sure not to expose security relevant information
Today I noticed that a few Google advertisements in an adsence block on one of my pages were trying to display a file called "/pagead/badge/checkout_999999.gif" from my server. I did a bit of investigating and found out that the companies behind these adverts use Google Checkout and "checkout_999999.gif" is supposed to be a tiny shopping kart icon with a tooltip which reads "This site accepts Google Checkout".
My problem is that "/pagead/badge/checkout_999999.gif" doesn't exist on my server. What do you do to handle this on your website? e.g:
Save the logo () on your server in the place it is expected by Google?
Use a mod_rewrite rule to redirect the request? To where though?
Find a adsense option to turn off Google checkout enabled adverts? (I looked but couldn't see one?)
Ignore the issue and get on with something important
Back-story - please ignore unless very bored: Page 2 of the search page on our site suddenly stopped working and I didn't know why. It turned out to be related to Google adsense. We use PHP session variables to save search criteria over different pages which worked fine for a while but then randomly stopped working. Random bugs are the worst! I was trying to work out what else is random on the page and decided that the Google ads were the only other random thing. Sure enough, sometimes a particular advert seemed to clear the session variables and break the search. What was actually happening was that the advert was requesting a image from our server ("checkout_999999.gif") which didn't exist and Apache was behind-the-scenes redirecting to the site homepage which unfortunately clears the session variables needed for the search - hence the non-obvious breakage. I'm a bit worried that Google ads can request random files from my sever? I'd prefer if they could only use absolute URL's if they want to include logo's or other media.
Sounds like a bug with google adsense delivery. File a bug with them is your best bet for a long-term fix.
After playing around with Apache mod_rewrite for a while I have found a rule that seems to fix my Google Adsense issue:
RewriteRule ^\/pagead\/badge\/checkout\_999999\.gif$ http://pagead2.googlesyndication.com/pagead/badge/checkout_999999.gif [R=301,L]
The problem is I'm not sure how to stop a similar thing happening in the future if Google decides to hotlink to a different file?
As Google doesn't care about the problem (previous posts were sent in June and we are now in October... and the bug was reported directely to Google), I decided to put an image on my server that would suggest the user to click on the ad!
Clicks then increased!!
As this is my server, I can do what I want and that's not my problem if Google asks for files on my server. They cost me money by using my bandwidth and connecting to my server, I am now paid for that!!
You should do the same...