Hi. I am trying to redirect my visitors to for example http://localhost/site/test.php?lang=en_USbased on the country code in the cookie like this:
if (isset($_COOKIE['country']))
{
$country = $_COOKIE['country'];
header('Location: test.php?lang=en_US');
if ($country == "NO"){
header('Lo...
Hi,
I have an old website that URLs were like /page.aspx?sch=XXXX&prg=YYYY. I want to redirect those old URLs to my new website's URLs. I'm trying to use an .htaccess file to do the trick but I couldn't get it work. What I want is:
/page.aspx?sch=XXXX&prg=YYYY ==> /page/sch/XXXX/prg/YYYY
If someone could helped me, I'd be very please...
We have a piece of legacy code that (ab)uses fopen() calls to resources over HTTP: @fopen('http://example.com').
We want to move example.com to another host and then send 301 Permanently Moved.
However, we are not entirely sure if @fopen() will follow this. Initial tests show me that it does not. But maybe I miss some configuration pie...
Hi, this is my situation:
I need to create an app that listens to URL's entered on a browser so that when a particular site is entered (e.g. google.com), it redirects this to www.mysite.com/Redirect.aspx?site=google.com, so that this click is recorded on mysite.com and then the user is redirected to the original entry i.e. google.com
O...
What do I have to do to have a function on a website where it says it will redirect you to the site in 3 seconds or so?
...
Hi folks,
i have a nginx server running on ipv6 native. I want to set up a "proxy" to ipv4 with it.
server {
listen [::]:80;
location / {
proxy_pass http://www.mydomain.com
proxy_set_header X-Real-IP $remote_addr;
}
}
The Idea is to set up a AAAA record "ipv6.mydomain.com", and nginx should chan...
I'm trying to setup a staging subdomain and only want to allow access to certain ip addresses, but allow everyone access to any url starting /api.
What I have below works for the ip address, but always redirects if I try and access for example /api/projects or /api/users with an ip address not listed.
Any help would be greatly apprecia...
Hi Im trying to move a webpage from one domain to another.
Is there some way of doing the following, when a user gets into my page.
Enters domainOld.com/aUniquePage.html
Display domainOld.com/WeAreMoved.html
Redirect 301 domainNew.com/aUniquePage.html
Would that be possible with a .htacess and would google understand the 301 redirec...
Hi. My website use struts and tiles.
I use this link to link to register form:
<a href='<s:url action="register" namespace="/vtv" />' >Register</a>
here is the register.jsp:
<s:form namespace="/vtv" action="register">
<s:textfield label="Username" name="username" />
<s:textfield label="Password" name="password" />
</...
I've created a ControllerBase class that overrides the Execute method of the default Controller class. I'm doing this to check the url and pull an associated page from our database. If the page isn't found, I want to redirect to a specific url ("invalid-page"). All is working except the redirect. I've tried to use Response.Redirect("inva...
I'm trying to get my head around this one:
Say you have two models where:
:bar has_many :foos
And you have a url like this: http://myapp.com/24-name-of-the-bar-to-param/foos/new
On my site this page shows a lot of information about the bar which users are going to create a foo for. So, even if a user isn't logged in the user will sti...
I have web page running on the Apache. Web page is using Apache basic authentication. So when user tries to access certain page - must enter user/pass before to get authorised. I would like to display notification (except a list of IP addresses) screen with accept button just before authentication.
Other comments on above:
I can't sto...
I am having difficulty with code igniter routing.
http://www.mysite.com goes to the right controller and does the right thing. However, http://www.mysite.com/?ref=p&t2=455 causes a 404 error. Also http://www.mysite.com/mycontroller/mymethod/?ref=p&t2=455 works fine.
I changed the uri_protocol in the config.php file and tried...
I have error page settings in my web.config like:
<customErrors mode="RemoteOnly" defaultRedirect="ErrorDocs/500.htm">
<error statusCode="404" redirect="ErrorDocs/404.htm"/>
<error statusCode="403" redirect="ErrorDocs/403.htm"/>
</customErrors>
Is there a simple way to redirect to 404 page without typing its name? Ex: Response...
I'm currently trying to set up integration/acceptance testing for a new rails 3 application with cucumber and capybara. (I initially planed to use webrat, but it seems that it does not support rails 3, so I ended up with capybara)
I'm trying to get a basic login test working:
Feature: Login user
In order to access the non-public part...
I have a dynamically generated HTML page that uses Google charts. The things is that the page generator doesn't have easy access to the data the chart needs to display. So my thought is to have it instead generate a URL that encode what it does know and that point at another server that does have access to the data. This sever than gener...
I have a blog background website. We provide some HTML code that the user can insert into his page, and it has something like this:
<img src="http://site.com/img.jpg" />
Unfortunately, I have had to relocate the images from time to time. Each time I have to relocate the image, the image no longer works for the people who have put the...
I'm trying to redirect all pages and subdomains by preceeding them with a m. subdomain unless it starts with a m. yet it completely fails. where am I going wrong?
example.com or www.example.com -> m.example.com
test.example.com -> m.test.example.com
images.example.com -> m.images.example.com
m.example.com -> Don't redirect
m.test.exampl...
Hi. I am making a site that depend on users to register to be able to play my online game. If they don't login they only get to see the intro page.
If the user login to the site I will save this information to the cookie so next time they visit they will be sent directly to the login.php. If the user don't have this information in the c...
I have been needing a way to, once I redirect to a PHP page to review data, have the ability go back to the original page with the fields filled as they were before redirecting. I can think of several messy ways of doing this but nothing I am willing to do. Is there a standard way of doing this?
...