FAQ Database Discussion Community


Excluding certain pages from being redirected to https

wordpress,.htaccess,redirect,https,http-redirect
I'm using the following rules on my WordPress website to: Redirect all http pages to https Redirect the careers page to http <IfModule mod_rewrite.c> RewriteEngine On # Go to https if not on careers RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} !^/careers$ [NC] RewriteRule ^(.*)$ https://www.mywebsite.com/$1 [R,L] # Go to http if...

How to change the root of a website in .htaccess every year?

.htaccess,mod-rewrite,redirect,url-redirection,http-redirect
I want the root of a website change every year to a directory named by that year using an .htaccess file. Simply I want this url http://www.example.com/ redirect to this url http://www.example.com/YYYY/ where the YYYY is an actual year (e.g. 2015) using .htaccess file. I have multiple questions: Which HTTP...

header() not working in php when the url contains parameters? [closed]

php,redirect,http-headers,url-redirection,http-redirect
So I'm using $_GET to capture the URL to use it later but when I use $_GET it wont redirect! So here's my sample code: URL : http://localhost/project/active.php/?s=ieugfshd&h=qwuyrbcq&i=1 php code: <?php include 'init.php'; $s = trim($_GET['s']); $h = trim($_GET['h']); $i = trim($_GET['i']); $q = key_check($s,$h,$i); if($q == 1) { header("location:password_active.php");...

301 Redirect entire site to new site using .htaccess file

.htaccess,mod-rewrite,redirect,http-status-code-301,http-redirect
Ive got a site siteONE.co.uk that i want to 301 permanent redirect all the pages to another site, siteTWO.co.uk For this im currently using the this .htaccess file below, but im have to type out a new line for each page i want to rediect even though they are all...

Open page in new tab/window AND direct current window to a new url

javascript,html,http-redirect
I have set my form action to "_blank" so that the pdf document I am creating opens in a new tab/window, this works fine but I want the source page to simultaneously redirect to a different URL. How can this be done? HTML and/or JavaScript solutions please. Thanks in advance.

AWS s3 forces 302 redirects when url has no trailing slash - need 301s

redirect,amazon-web-services,amazon-s3,http-headers,http-redirect
I'm migrating a Wordpress site to a static site hosted in an Amazon s3 bucket. All pages are in a directory structure (eg, blog/index.html) but can be accessed via /blog/. By default, Amazon redirects urls missing trailing slashes via a 302 redirect (www.site.com/page -- 302 --> www.site.com/page/). This is awful...

Persistence of Redirect URL when redirecting after a POST and passing data

django,django-forms,http-post,http-redirect
Upon successful submission of a form, I redirect to a "success" page that display a 'thank you' message along with some information about the submission. To do this, I put the POST data in session, Redirect to the appropriate URL, and then render the template using the session data. But,...

IIS 8.5 HTTP Redirect VS Favicon

iis,favicon,http-redirect
Hello! The issue is that the favicon does not appear when http redirect is active in IIS 8.5. My OS is windows server 2012 r2, the web browser is IE11. What I do: I go to IIS 8.5,click on http redirection, check the first option, enter the http link and...

How to Add Iframe Current Domain on Visiting?

javascript,jquery,dns,url-redirection,http-redirect
Listen this is main site link >>> http://magazinerpros.blogspot.com/ Now i want that if someone click on the above link. then it should open to hold another link too. like you see in Example #2. that hold extra frame link { http://www.inframe.com/p/preview.html? } before the main link. Example #2 http://www.iframe.com/p/preview.html?url=http://magazinerpros.blogspot.com/ I...