Tag: htaccess
-
Redirecting a domain to a website with a query string
A permanent 301 redirect in the .htaccess file lets search engines know that an old link has been replaced by a new one. It’s the recommended method for directing traffic from an existing page. Some common uses of a 301 .htaccess redirect to a new website with a query string: wildcard redirection OLDDOMAIN.COM/XXX.php?YYY…
-
Redirect ALL files on your Domain Site Redirect Code
To redirect ALL files on your domain use this in your .htaccess file if you are on a linux web server: redirectMatch 301 ^(.*)$ http://www.site.net redirectMatch permanent ^(.*)$ http://www.site.net You can also use one of these in your .htaccess file: redirect 301 /index.php http://www.site.net/index.php redirect permanent /index.php http://www.site.net/index.php redirectpermanent /index.php http://www.site.net/index.php If you…
-
How to avoid logging of 404 missing files into error_log
how to stop logging of 404 error? The Simple Method to to disable logging of 404 error into Apache error_log file is: – open .htaccess file – domain for which you want to disable logging missing files ( 404) – put bellow code into .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond…