I am using sharepoint 2013 version and hosted a site on sharepoint server.. I am using below code and saved in index.htm and make it default page.
<html>
<head>
<title>Redirecting...</title>
<meta http-equiv="REFRESH" content="0;url=http://www.yoururl.com">
</head>
<body>
</body>
</html>
Due to this, URL is only working when i type http://www.yoururl.com/index.htm i am looking it should work without index.htm .
Showing the below error
HTTP/1.1 200 OK
Server: Microsoft-IIS/8.0
Date: Fri, 31 Jan 2014 10:44:11 GMT
Connection: close
Any help or suggestion ?
Many Thanks
Url rewriting is a server side configuration. Depending on the hosting, you can or cannot infuence rewrite urls engine. It is hardly possible to influence it from index.htm.
Related
We have a Wordpress based website that use <meta> to allow front-end retrieve the user's login status. However, it seems like not working properly on Firefox. Firefox keep caching the webpage even we have cache-control: no-cache, no-store, must-revalidate setup. I have tried few suggested solutions and none of them works on Firefox but works on Chrome and Safari. Here are the solutions I tried
# In the header of the page (Firefox just remove it from the page)
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="Sat, 26 Jul 1997 05:00:00 GMT" />
# From php
header("Cache-Control: no-cache, no-store, must-revalidate");
header("Pragma: no-cache");
header("Expires: 0");
# Apache config
Header always set Cache-Control "no-cache, no-store, must-revalidate"
You can visit this page on different browsers and see the response headers in the Web dev tool. My result from:
Firefox and my result from Chrome.
Open to any suggestion, thanks much for help.
After the investigation, it's due to the Cloudflare. Not sure why it only effect Firefox, but after DevOps team modify the config on Cloudflare, the issue is fixed.
Once I asked this same question but now I can give a test case for it.
The problem resides in debugging in Eclipse PDT when the page sends multiple requests to the server's dynamic pages. Consider a web page as follow:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script src="link-to-jquery/jquery-1.7.2.min.js"></script>
<script>
$(document).ready(function() {
var list = $("ol");
for (var i=0; i<20; i++) {
list.append($('<li><img src="/img.php?'+i+'" /></li>'));
}
});
</script>
</head>
<body>
<ol>
</ol>
</body>
</html>
In above page, JQuery is used only to prevent browser from caching the images. And the the img.php reads like this:
<?php
readfile('some_image.jpg');
When I try to debug the first page in the Eclipse PDT, using Zend Debugger, only the first img.php request is made and others are dismissed. A sample output is shown in the attached image file. In the presented case, not loading an image file won't prevent you from debugging the rest of project. But once there's a javascript file which isn't loaded because of this problem, the rest of project won't work as it has to. Does anyone know how can I debug such a page?
Here are my specifications:
PHP Version 5.3.14
Zend Debugger v5.3
Eclipse for PHP Developers, Version: 3.0.2
Apache/2.2.22 (Ubuntu)
I found that this problem is specific to Zend Debugger and XDebug works smoothly.
+1 for XDebug, -1 for Zend Debugger
I'm having trouble displaying latin1 characters such as "ç", "ã" or "À" in the latest versions of Safari and Opera. I receive data (JSON) from a RoR backend using Ajax and JQuery (Latin1 charset) and the webpage itself relies on Latin1, thanks to:
<?php header('Content-Type: text/html; charset=ISO-8859-1');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml"
lang="pt">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
The custom Javascript lib i made also specifically states ISO-8859-1 when I perform the include some ten lines later on:
<script type="text/javascript" src="js/lib.js" charset="ISO-8859-1"></script>
Nevertheless, both browsers fail to display the characters afterwards. Safari shows the infamous black diamond, while Opera simply shows a blank space.
Any ideas? Thanks in advance
Most likely wrong charset sent in your Content-type: HTTP header for the JSON data. In your post you show the headers and META tags for the page itself and the included SCRIPT, but assuming the JSON data is sent separate it will be labelled separately. It would help to get a link to a page with this problem, but if you don't want to post one you can use a tool like Microsoft Fiddler HTTP debugger to inspect the headers that are being sent back and forth between the browser and the web site. If the web server sends
Content-type: text/html;charset=UTF-8
for a file with content in "latin" (iso-8859-1) or vice versa, that's your problem. Fix the HTTP header and you'll be fine.
I'm trying to optimize my site using yslow and I scored an F for "Add Expires Headers" I currently have my index page set to no-cache for users logging in so my question is, is it possible to add a filematch for other file types like images, css, and js to my htaccess file?
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"/> <!-- Important for security -->
<META HTTP-EQUIV="Expires" CONTENT="-1"/>
If so will this impact or override my no-cache setting?
Thanks,
-Paul
Have a read of the section that starts "Never Expire" Policy in Chapter 3 of the Book of Speed - http://www.bookofspeed.com/chapter3.html
Please suggest a method other than use of .htaccess..
It really is homework-due-day today.
Theres httpd.conf (apache)
http://httpd.apache.org/docs/1.3/configuring.html
Or, forcing an "Error 301 - redirect".
Or, you could put a meta-refresh in your webpage redirecting to the new webpage.
e.g.
<meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com">
Or you could use javascript to force the redirect.
<script type="text/javascript">
window.location = "http://www.google.com/"
</script>
Then there are things like Reverse Proxy that could do what you wanted.
Depending on the technology and/or your access to the web server there are various options. In addition to the above you could use a server side code redirect e.g. in ASP.Net
Response.Redirect("http://www.google.co.uk")
I'm sure there are PHP and various other code alternatives to perform the same action.
You can do a client side redirect using an index.html and a META Refresh tag.
<html>
<head>
<meta http-equiv="refresh" content="0;url=http://www.mysite.com/MyDir/MyPage.html" />
</head>
</html>
http://en.wikipedia.org/wiki/Meta_refresh
Implementation-agnostic:
The following status codes can be used in a web server response:
301 Moved Permanently
302 Found
If you don't have access to a decent web server, try the Javascript
or Meta-Tag methods above.
Bonus: another implementation-specific advice, using Hunchentoot:
(redirect "http://otherhost/otherpath")