Category: htaccess
-
WordPress: Add or remove ‘www’ from your url
In most cases we see that when we try to open any site then it add ‘www’ in the url or remove from the url. This can be manage by Htaccess in general sites on the server. Wordpres provides a good facility to manage this url setting. 1. Go Settings > General 2. Set WordPress…
-
301 redirect in PHP and .htaccess
What is 301 redirect ? You have a website and its all pages are ranked in the search engine. And now you’ve moved these files to a new domain. What will happen in this scenario!!. You are sending the visitor to “Error 404 – File not found” page when they follow your website in the…
-
Hiding PHP file extension
Do you want to hide your web site’s server script identity ? If you don’t want to reveal the programming language ( server side script ) of your website to visitors of website so that any hacker or spammer will not be able to intrude or inject any code in your website. Here is a…
-
Uploading large(big) files in PHP using .htaccess
I’ve seen that many of my friends are struggling with the uploads of the bigger or larger files in PHP. After looking at their struggle, i’m here to solve the problem of uploading larger or bigger files in PHP. Most of the web servers are configured such a way that a user can only upload…
-
Custom Error Page with .htaccess
In my last post of Hiding .php file extension with .htaccess Michael has mentioned that you can create your own custom page for the the 404(not found) error in server. And alex wanted to know that tip as well.Alex here is the post for you rather than replying your comment. When you mistype the URL…
-
Prevent Directory Listing using .htaccess
What is directory listing ? As we know, most of the website contains “images” folder inside the root folder. If we type “www.somesite.com/images” in the browser and it shows the listing of the files in the browser like the picture below which means that directory listing is allowed on that web server. It’s better not…
-
Hide .php extension with url rewriting using .htaccess
Last time I’ve written an article about hiding php file extension where I’ve showed you how you can use .html or .asp extension of file instead of .php extension. But there was one flaw in that technique you have had to change the file extension explicitly but in this post I’m going to show you…
-
5 useful url rewriting examples using .htaccess
If you are looking for the examples of URL rewriting then this post might be useful for you. In this post, I’ve given five useful examples of URL rewriting using .htacess. If you don’t know something about url rewriting then please check my older post about url rewriting using .htaccess. Now let’s look at the…
-
How to check and enable mod_rewrite module in apache
Well, I’ve got around 15 emails asking from readers, how to check the mod_rewrite module in apache and enable mod_rewrite module in apache after reading two most of the popular post of this blog 5 useful url rewriting examples and hide .php extension with url rewriting. How to check weather mod_rewrite module is enabled or…
-
Change default directory page using .htaccess
I know you guzy all know about index file. This is the default file which is executed in the web server. For example, if you type”http://naveenos.com” in this the browser, the “index.php” gets loaded first. This “index.php” file is commonly know as directory index file. Basically , the default executed file in the web directory…
-
How to redirect browser to https (ssl) in php
Most of the e-commerce website uses payment gateway for online payment. And, those sites uses SSL (secure socket layer) connection to transfer data to and from the payment gateway. In the common scenario, most of the sites uses “http” protocol and you can see “http” in the browser’s address bar. But in the above scenario,we…