Feedburner used to a powerful tool for RSS feeds publishing and subscriber management. However, feedburner will unlikely leave its maintenance mode because there has been no new features yet less features for quite some years. But RSS feed is still an important part of the Web supported by many software such as WordPress. follow.it is
Read more
Tag: htaccess
How to redirect non-www domain to www domain in .htaccess?
Posted onI have a website. But I would like use the www.example.com instead of example.com. How to redirect non-www domain to www domain on my server? I am using apache2 (httpd). You can add a piece of code into the top .htaccess in your site: Specific method: redirect example.com domain to www.example.com domain RewriteEngine On RewriteBase
Read more
How to get file extension in JavaScript?
Posted onHow to get file extension from a file name in JavaScript? For examples, For “file.txt”, I want to get “txt”. For “file2.multi.ext.fileext”, I want to get “fileext”. This JavaScript function works well for me. function getExt(filename) { var idx = filename.lastIndexOf(‘.’); // handle cases like, .htaccess, filename return (idx < 1) ? “” : filename.substr(idx
Read more
How to allow websites’ .htaccess files in Apache2?
Posted onHow to allow websites to use .htaccess files in Apache2 web servers? The AllowOverride directive controls this: http://httpd.apache.org/docs/current/mod/core.html#allowoverride To allow AllowOverride in a directory, add the following rules to the /etc/httpd/conf/httpd.conf or similar configuration file for your apache installation: <Directory “/var/www/www.example.com”> Options FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files.
Read more
How to redirect WordPress search query to Google CSE?
Posted onHow to redirect WordPress search query to Google CSE? You can configure Google CSE to read the query variable (by default, it is q). Then, in your WordPress’s .htaccess file, add these 2 lines RewriteCond %{QUERY_STRING} ^s=(.*)$ RewriteRule ^ https://www.google.com/cse/publicurl?cx=xyz&q=%1 [R,L] Here, “https://www.google.com/cse/publicurl?cx=xyz” is your CSE’s public URL or the webpage that contains the Google
Read more
How to force a website to use https by htaccess settings?
Posted onI would like my site to be accessed by https only. How to force a website to use https by htaccess settings by redirecting http requests to the corresponding https ones? You can check the method of redirecting http to https at: https://www.systutorials.com/qa/1033/how-to-redirect-http-to-https-in-apache-with-mod_rewrite If you would like to have a 301 redirect, you can use
Read more
How to redirect HTTP to HTTPS in Apache with mod_rewrite?
Posted onI’d like to force using of https on one of my site. How to redirect HTTP to HTTPS in Apache with mod_rewrite? You can put these lines to the .htaccess file in the directory from which you would like to redirect HTTPS to HTTP: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Add header footer in directory listing in Apache (httpd)
Posted onHow to add header footer in directory listing in Apache (httpd)? In the web directory’s .htaccess file: Options +Indexes IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8 HeaderName /header.html ReadmeName /footer.html IndexIgnore header.html footer.html .htaccess header.html and footer.html are under the website root directory (not the Linux root).
Installing WordPress in a sub directory while working for the whole site
Posted onHow to install WordPress in a sub directory while working for the whole site? Putting the WordPress files in the root directory seems messy. A method is introduced here: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory The process to move WordPress into its own directory is as follows: Create the new location for the core WordPress files to be stored (we
Read more
How to change the maximum execution time and memory size allowed for PHP
Posted onI see this message in the error log of httpd: PHP Fatal error: Maximum execution time of 30 seconds exceeded in and PHP Fatal error: Allowed memory size of 268435456 bytes exhausted How to change them to a longer and larger value? To change the allowed maximum memory usage of PHP: Set memory_limit = 256M
Read more
.htaccess: How to disable directory listing?
Posted onHow to disable directory listing using .htaccess? The webserver (Apache) should allow downloading files in a directory and child directories of it but forbid listing of the directory and child directories. In the directory that you want to disable directory listing, create the .htaccess file that contains: Options -Indexes You can also done by Options
Read more
Search Engine Friendly URL for MediaWiki
Posted onMediaWiki is the wiki-engine that runs Wikipedia. In this tutorial, we introduce how to configure search engine friendly URLs in MediaWiki. ==Search Engine Friendly URLs== Default MediaWiki URLs look like www.example.com/w/index.php?title=TITLE which is a little ugly. To make it more search engine friendly, we will change it to SEO-friendly URLs like www.example.com/w/TITLE. ==Enabling Search Engine
Read more
A Free Personal WordPress Blog Solution
Posted onIf you want to have a wordpress blog for FREE co.cc + x10hosting is the best choice. I will introduce both in this post. I will briefly introduce how to set up a wordpress blog like my blog. The overall that I paid for this blog is only $0.89. I can say that it is
Read more
Speeding Up the Site With Apache GZIP Compression
Posted onWe can speed up the site with compression while save bandwidth at the same time. As most of the modern browsers support gzip encoding, we can set it up to let the users enjoy faster speed. The Apache mod_deflate is easy to set up and standard. It compress the content on the fly. We can
Read more
How to Redirect WordPress Feed to Feedburner Using .htaccess
Posted on.htaccess is a powerful tool. Let’s look at how to using .htaccess to redirect WordPress feeds to feedburner. Let’s use my blog as the example. The WordPress’s feed url of my blog is https://www.systutorials.com/feed/. Now I want to redirect it to feedburner with url http://feeds.feedburner.com/systutorials . The idea is quite straightforward: For every request to
Read more
How to Redirect a Page with HTTP 301 in PHP
Posted onHTTP 301 Redirect is an SEO friendly way to redirect readers to a page’s new location. There are a lot of benefits of using HTTP 301 Redirect. These benefits can be found in the htaccess method post. htaccess or PHP can be both used for sending 301 redirects. The htaccess method can be found in
Read more
How to Change the Site’s Default 404 Error Not Found Page
Posted onThe apache’s default “404 Error not found” page seems ugly. And may some hosting service put theire ads in it. We can add some entry in .htaccess to change the defualt 404 error page. This method can also be used for some other error codes. A list of the server returned codes can be found
Read more
How to Redirect Old Domain to New Domain Using htaccess Redirect
Posted onI want to move the sub domain blog.pkill.info to systutorials.com permanently. I can manage all the pages I want to post using WordPress. Changing domain in a bad way is dangerous. Put a page the tell the reader that the site is moved to a new domain is very unfriendly to the user and also
Read more