First
Let say that i have www.domain.com that are client site and user login and do all the thing that he want (site is main and he use POST method for login adn other things and HEADER redirect if login are success)
But i not want user to see original www.domain.com i want when they enter www.name.com/dashboard.php to see content from www.domain.com/dashboard.php but him URL bar to show www.name.com/dashboard.php ..and like this all other page that can have original www.domain.com
I found this site:
http://www.htmlremix.com/css/permanent-url-masking-for-mirroring-website-using-php-and-htaccess
Adn use script but when are entered user login detail noting happen!! Just home page reload.
I try everything that i think may be cause problem and not found how to solv it .. So please help me!!
Thanks Allot
P.S. If have some more good way that can i use also will help me!
that cant be achieve with a htaccess file.
You need different things.
possible solution could be:
apache mod proxy so you could proxy everything through that url.
the other way could be a php written some kind of proxy. Working with curl or and remote configured fopen.
But be careful to also send the post data and the cookies, otherwise the user session could not be handled if its cookie based.
If both domains are on the same server you could easily set this up with a vhost configuration in apache/nginx what ever you are using.
Related
I got a huge redirect problem, I set up a sub-domain
http://subdomain.myspace.com/
and copied a project over as well. Owned it, set chmod particular on 777 so me and the Designers can work on this one, this works fine. Problem is now, whenever I call the URL of this sub it redirects me to the
http://www.originalsite.de
original Site. Even when I take out the .htaccess AND replace the index.php, which is a hard way to go for it, it redirects me. For this is by far not the first time I do this, what makes me even more surprised. But what kind of redirect can this be?
No redirect via .htaccess nor via index.php. I know there's no code but the company I'm working at won't allow me to post the code.
I hope anyone can help.
There is not enough information on your setup to determine the cause of the redirect but i have a guess. If you have ruled out all the possible scenarios of a redirect being in existense (i.e. Htaccess, php etc) then check your caching. Chrome and Firefox sometimes cache dns and http requests.
Try the following:
Open an "incognito" window in chrome or "Private" in firefox, and try loading your subdomain.
If it still redirects, then you still have a hard redirect somewhere hidden (Perhaps in myspace settings)
If this works and does not redirect, then it's my guess above with caching (Clear everything and you should be fine - Plus disable prediction and navigation errors correction in your chrome settings)
Hope this helps
I'm trying to change the URL for my site, by going to settings in wp-admin and changing both site url and wp url.
All seems well after I save changes, I'm able to navigate around my blog using the new url. However when I try accessing wp-admin I'm getting a redirect loop. I can still access the wp-admin login page with the old url admin site. In order to access my admin page again I have to login to my DB and reset both urls.
I've also tried to add this code with my urls to my wp-config file
define('WP_HOME','http://www.sample.com');
define('WP_SITEURL','http://www.sample.com');
Other information about my setup:
Openshift is hosting wordpress with the quick start app and proper alias have been added to my app.
Cloudflare is managing my DNS
I wouldn't think either of these factors would be the issue because the site wouldn't work at all if one of these were misconfigured, but at this point I'm drawing a blank. Was thinking maybe it might have something to do with wordpress forcing SSL for wp-admin?
Found It!
I love how when you gather all the information to ask a proper question it seems to line you up for the solution.
I'm also using http://wwwizer.com/naked-domain-redirect to redirect naked domain request to www using an A record in my DNS. All I had to do was turn off cloudflare's protection to this DNS entry.
I am really new to Drupal and playing around with this existing Drupal site.
I did a FTP transfer of all the files to my local computer directory. I currently got it on a Vagrant box and I can access the site via http://192.168.56.101/html.
I can do http://192.168.56.101/html/anything-but-user and it brings me to the proper area on the site. However I can't do localhost/html/user, because it redirects me to the website URL rather than the local URL.
I tried clearing the cache (with Drush). I scanned all files in the system and changed the web url to the local URL [not sure if I need to do any other command], and I can't seem to find anything in the .htaccess files that would lead me to this.
The href="/user I would greatly appreciate any advice or help in figuring out this solution.
--UPDATED
There was a module called "Secure Pages" that was causing the user and registration links to be locked and static to prevent redirects to phishing sites. I had to disable this module using "drush pm-disable securepages" in the terminal.
Some typical items you may want to check:
Check if you get the same problem using another browser. If with another browser it works, then it is pretty sure a cookie problem. To solve that, delete the cookie in the browser where you have the problem.
Make sure "clean urls" is enabled. Refer to "https://drupal.stackexchange.com/questions/165029/clean-url-leads-to-duplicate-url-after-migration-to-another-hosting/165044?s=1%7C3.9647#165044" for more details on that.
Make sure the value of "base_url" is set correctly (in your settings.php).
If module Secure Pages is enabled, then try to (at least temporary) disable that moduel to see if it helps.
Apparently, there was a mod called "SecurePages" that was causing the URLs to be static to prevent someone from changing them and redirecting users to a phishing site.
I have WordPress installed and running on GAE and have added my own custom domain via Google Apps. This is great but my appspot.com url is still publicly accessible and searchable.
How would I go about blocking this and redirecting to my custom domain?
I imagine it involves adding a url handler in the app.yaml file that points to a php file. I have no idea what would go inside though.
Also, how would I then go about setting up a 301 redirect for website canonisation and SEO that accounts for SSL and cron entries?
Any help is appreciated, thanks!
The appspot.com URL is always accessible and there is no way to turn it off. You can't do much in the app.yaml since it's not aware of the custom domain. I'm not really a PHP guy but you should do is to write manually the redirect based on the host URL if you really want to do that. Since you're using WordPress you might need to do quite some work if you don't want to redirect only from the root, but from any page.
Personally I think you should just leave it there and do nothing, even Khan Academy is not redirecting (http://khan-academy.appspot.com) and I'm pretty sure that very few are actually doing that.
I have url where i host my webinars which is provided by webinar hosting provider. I would like to change that url to something within my domain.
For eg. The webinar url is something like
http://www.onlinemeetingnow.com/seminar/?id=d181a7640e
i would like to change it look something within my domain.
www.mywebsite.com/webinar
Is this possible?
The simplest way of doing this would be to create a PHP script at the desired URL that simply does a readfile () of the target URL. That would give the appearance that your site is hosting the remotely hosted content.
<?php
readfile ('http://www.onlinemeetingnow.com/seminar/?id=d181a7640e');
?>
This approach does require allow_url_fopen to be enabled, which it might not be for security reasons. It also has issues regarding such things as cookies, for example. Say you are using this trick to link to a remote site that requires a login and uses cookies to implement it, people who are logged into the remote site would appear not to be logged in, as their cookie wouldn't be sent to the remote site when you readfile () it.
You could use curl instead, as you have a bit more control, and it doesn't require allow_url_fopen. It still wouldn't be ideal though.
If you can configure your server, you could possibly use something like proxypass or URL rewriting to hide the remote URL.
Other solutions include using an iframe to display the remote site, or using AJAX to load the remote page's markup and inject into your page, but these approaches have their own set of issues that you need to take into account.
In the end, is it really worth the effort needed and the compromises you will have to make to just have the URL appear to be locally hosted when it isn't?
Maybe you want to create that page(s) on your own site and within that page you load the onlinemeetingnow url. This can be done with an iframe or such or you can get the html code from the page (with Curl or something) and than load that into your own page.