Why www.mydomaim.com not working for wordpress? - php

I have wordpress website on openshift cloud. URL mydomain.rhcloud.com or http://mydomain.rhcloud.com work fine in browser.But when site access through www.mydomain.rhcloud.com URL "server is not find" shown.why this happen?

There is no record created for www.mydomain.rhcloud.com, only app-domain.rhcloud.com. if you want to add your OWN domain name like www.example.com, you need to purchase it, then add an alias to your app-domain.rhcloud.com, and setup your dns for www.example.com to point to it using a CNAME record.

I guess that the original domain name here is "rhcloud.com" and that "mydomain" is just a subdomain. In this case, "www.mydomain" is a different subdomain and it cannot be redirected to "mydomain.rhcloud.com".
To make this work, you should grant "www.mydomain" subdomain and either put your site there or make it redirect automatically to "mydomain".

Related

How to redirect custom domain to my project domain

I was trying to build a URL shortener.
My primary domain is makemyshortener.com
But as i need to make URL shortener i need to make my URL short
so after shortening the main url it's converted to mms.com/eer22
My problem is whenever user click on the shortened link i.e. (mms.com/eer22) how to check it with my main domain database?
Get the shortened parameter(eer22) using htaccess. In database connect statement, give primary domain as your host instead of localhost and use its credentials and database name. Compare and redirect.

Change WordPress permalinks after a domain forwarding

So here is the situation:
I have a domain, a.com registered on host1.com
I have a domain, b.com registered on host2.com and a Wordpress website on this domain, hosted in the same hosting(host2.com).
I forwarded a.com domain to b.com using the domain forwarding service of host1.com.
Now when I type a.com in my URL bar in my browser, I see the wordpress website from host2.com but because I masked a.com I still see a.com in my URL bar.
So far so good and this is exactly what I wanted to do.
Here begins the problem:
All internal links in my wordpress website are still linked to b.com.
For example if I click a post, the link is b.com/posts?id=4 and the URL bar shows just a.com even when I go to that specific post and no matter to what page or post I click, the URL bar shows a.com.
What I want to achieve is to show a.com/posts?id=2 or any other url pattern but with the a.com as prefix.
I know it's a little bad explained but I really need your help and would be happy to clarify any questions you had to fix this problem.
Thanks

New Facebook Login with Codeigniter

i have implemented many code in my project.I am not able to identify the issue.
Which URL i need to use with this Everytime i get this error.
Given URL is not allowed by the Application configuration.: One or
more of the given URLs is not allowed by the App's settings. It must
match the Website URL or Canvas URL, or the domain must be a subdomain
of one of the App's domains.
put mu redirect and return URL string as - "http:// localhost / facebook/"
Same string i put in my FB App Account as "Site URL" : same line as above
I know this is repeated question but ...
Facebook login do not work locally, also you need to mention the URL in you facebook APP Setting
Go through following link for more details:
http://code.tutsplus.com/tutorials/how-to-authenticate-users-with-facebook-connect--net-12302
Canvas URL should be
http://localhost/facebook/
without spaces or otherwise.
In App Domains you should also add
localhost
Use IP Address i.e. 127.0.0.1 instead of localhost
and one more thing you should check .i.e you need to define redirect_url along with your config and which is must be same as site_url you define in your facebook app
Checkout http://subhra.me/using-facebook-php-sdk-3-codeigniter-2-1/
This a very simple tutorial.

Domain Masking For Multi Subdomains in a SaaS App

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.

Create dynamic subdomains

It has been a while since I've been thinking over this feature that some websites are implementing and it looks to be very successful.
Websites like tumblr.com, blogger.com, wordpress.com allow users to register new sub-domain names from within the website by using a simple HTML/PHP form. With my current knowledge of PHP I couldn't figure out myself how this is done. I've read some posts on this and still can't build a clear idea about this.
So, how do I create a script that allows users to register their own sub-domains on my website (www.username.mydomain.com) and more than that, how do I allow them to use a different website template (as wordpress.com does). Is this possible to be done on a shared server or a dedicated server is needed?
These subdomain issues are brought down to the level of nice URLs, friendly URLs etcetera, as this feature has various names.
Basically what you do is that you set up a redirection so that if someone enters foobar.example.org, the server will serve example.org/user.php?name=foobar or example.org/foobar. After this, it's only a matter of how you put together your PHP script so that user.php or the contents of /foobar is parsed properly. The "registration" part is statically done in the .htaccess file in your DocumentRoot.
Of course this will need some sort of proper error handling for a nonexistant "subdomain".
I can tell you a simple approach.
First you have to enable subdomains in your domain. You can search for 'wildcard-dns and sub domains'. Next all is programming logic.
While registering you can ask for a unique subdomain name. After login, redirect it to the registered subdomain.
It's easy to create the wildcard subdomains. Check my post for create the wildcard subdomains dynamically in Create subdomains on the fly with .htaccess (PHP) .
How to Create Dynamic Subdomain with the help of PHP and Htaccess
We can create dynamic sub domain like top websites who provides us sub domain access with the help of username, I will try to give the best solution for the programmers. I am going to explain how to use htaccess with PHP to create dynamic sub domains, using this you can easily host multiple sub domains on single server.
Process to create dynamic subdomain
Add zone record in domain name setting
Open the setting of your Domain name provider and go to your domain DNS(Domain Name Settings), click add zone record.
Create A record and Point to IP
Now you need to create a custom A record for all your subdomains.
Select A record, HOST * POINTS TO: Your IP Address
Example : 102.30.138.121
Create a record and point to ip prashantabhishek.com
Repeat the same for host #.
Create dynamic subdomain by Prashantabhishek.com
Add CNAME record
HOST www points to # (this refers towards your IP address. )
dynamic sub domain c name record
Save the setting and enjoy the code effect.
Read more at : https://www.prashantabhishek.com/blog/view-post/how-to-create-dynamic-subdomain-with-the-help-of-php-and-htaccess/

Categories