Redirecting 404 error with .htaccess via 301 for SEO etc

I came up with the solution and posted it on my blog http://web.archive.org/web/20130310123646/http://onlinemarketingexperts.com.au/2013/01/how-to-permanently-redirect-301-all-404-missing-pages-in-htaccess/ here is the htaccess code also RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . / [L,R=301] but I posted other solutions on my blog too, it depends what you need really

Need to redirect all traffic to https

This works for me: RewriteEngine on RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} If the traffic is coming in over non-SSL HTTP, then redirect to the HTTP equivalent of whatever page the user was originally trying to access. It also doesn’t involve any mod_rewrite options, so it’s easy to read. Side rant: why does everyone feel … Read more

Best Practice: 301 Redirect HTTP to HTTPS (Standard Domain)

To start with your favorite solution: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L] </IfModule> In the part handling non-https URLs you are redirecting to %{HTTP_HOST}. Then, in case your host name started with “www”, a second redirect has to take place to send … Read more

.htaccess redirect folder to a url

By default, Redirect sort of maps the path node to a new path node, so anything after the first path gets appended to the target URL. Try: RedirectMatch 301 ^/abc/cba/ http://www.aaa.com/? Or if you’d rather use mod_rewrite instead of mod_alias: RewriteEngine On RewriteRule ^/?abc/cba/ http://www.aaa.com/? [R=301,L]

How to send compressed (deflated) SVG via Apache2?

If Apache doesn’t know the mime type of the file (here image/svg+xml), you need to tell it specifically (not needed in most Apaches): AddType image/svg+xml svg svgz Now when Apache knows about the filetype, just add this to deflate it: AddOutputFilterByType DEFLATE image/svg+xml For more information see https://httpd.apache.org/docs/2.4/mod/mod_deflate.html

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)