How to remove specific web-service from my website? - .htaccess

My provider supports a web-analytics tool named Awstats on every website they are hosting. I don't want this service anymore but I can't tell them to remove it. That's why I need to ban it with the .htaccess.
I want that everyone who requests www.example.de/logs to be redirected to www.example.de/. How can I do that? I have nearly no experience with .htaccess files.

.htaccess redirect
To use .htaccess redirect one page to another page or website do the following:
Use:
Redirect 301 /folder http://www.example.org/
or
RedirectMatch 301 /folder http://www.example.com/
In your case you may add this inside your .htaccess file at your website root level, ie. public_html/.htaccess
Redirect 301 /logs http://www.example.de/

Related

I want to redirect my old domain all the page urls with new domain

I want to redirect my old domain urls with new domain with htaccess file.I have tried but it only works in root folder files when I access pages with Subdirectory from old domain it redirects to home page.
so anyone has proper solution?
For e.g.
My old url
www.olddomain.com/dir1/page1.php
Now when user goes to above link it will directly goes to
www.newdomain.com/dir1/page1.php
All you should need to do however is include this in the .htaccess of your old domain:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://new-domain.com/$1 [R=301,L]
For specific directories:
Redirect 301 /mydir http://www.new-domain.com
or if it is to go to another directory:
Redirect 301 /mydir http://www.new-domain.com/mydir

How to redirect traffic to website's landing page to LinkedIn profile page?

When it comes to server directives manipulation, I'm a complete novice.
That being said, I'm finding it difficult to redirect traffic from a website's landing page (e.g. http://picselbocs.com), which is basically empty, to a LinkedIn profile page (e.g. http://ro.linkedin.com/in/andreioniga), but without redirecting traffic to other pages of the same website (e.g. http://picselbocs.com/projects/cakemyface/) to the same profile page on LinkedIn, by using an .htaccess file?
Please help.
In the htaccess file in your picselbocs.com domain's document root, add:
RedirectMatch ^/$ http://ro.linkedin.com/in/andreioniga
Include a 301 if you want the redirect to be permanent:
RedirectMatch 301 ^/$ http://ro.linkedin.com/in/andreioniga
Alternatively, you can use mod_rewrite instead of mod_alias:
RewriteEngine On
RewriteRule ^/?$ http://ro.linkedin.com/in/andreioniga [L,R=301]
Remove the ,R=301 if you don't want permanent redirects.

Redirect old domain to ROOT of new domain?

So I have an old domain, and a new domain. Now I want to redirect the entire old domain to my new one. So I have this .htaccess;
Options +FollowSymLinks
RewriteEngine on
Redirect 301 / http://www.newdomain.com/
This works for the root of olddomain when I navigate to olddomain.com/somepage.php/ I get redirect to NEWdomain.com/somepage.php/ and I want to send visitors always to the root of newdomain.com.
From what I understand from other questions on here it works fine for other people (it always sends root domain) what gives?
Try using a RedirectMatch instead
RedirectMatch 301 / http://www.newdomain.com/
This tells apache to specifically match against something (in this case, anything with a / in it) and to specifically redirect to a target.

Redirect everything in a subfolder from one domain to another using .htaccess

I have a website migrated to a new domain. what's the best way to 301 redirect everything from: "domain1.com/folder/" to "domain2.com/folder/" in .htaccess?
As simple as
Redirect 301 /folder/ http://domain2.com/folder/
This needs to be placed on .htaccess in website root folder of the domain1.com.

htaccess 301 subdomain moved

I want to redirect URLs like http://www.site.gen.tr/index.php?ind=reviews&op=entry_view&iden=2381 to http://arsiv.site.gen.tr?ind=reviews&op=entry_view&iden=2381 site.
I tried using .htaccess but could not make it work. Please help.
You should put this in your .htaccess file (need to be in domain root)
RewriteEngine On
Redirect 301 http://www.site.gen.tr/index.php?ind=reviews&op=entry_view&iden=2381 http://arsiv.site.gen.tr?ind=reviews&op=entry_view&iden=2381

Resources