I need this page:
http://address.com/research/staff/profile.asp?id=p0026510
to redirect to basic HTML page.
Is there anyway I can do this? I have seen on here some answers about making a 301 redirect but I am not sure how to set one of these files up.
I have tried typing:
Redirect 301 /research/staff/profile.asp?id=p0026510 /about/staff/p0026510/p0026510.asp
Into the .htaccess file but it doesn't seem to work.
Related
We have a subdomain (oldblog.oursite.com) and we've set up over 600 redirects to (newblog.oursite.com), however, there are likely some live links to pages on oldblog.oursite.com that we haven't caught and implemented a redirect.
Is there a way to make oldblog.oursite.com redirect any URL that doesn't already have a redirect rule in place to redirect to the index of newblog.oursite.com? Preferably in the .htaccess file?
This should work if you put it last:
RedirectMatch 301 "^/" http://newblog.oursite.com/
Please test it. Any problems let me know. Take care that you are testing server generated redirects and not ones cached in your browser. Using 302 redirects during testing can help.
I am trying to add a simple 301 redirect to a website's htaccess, but no redirection is occurring, nor am I encountering any errors--can anyone shed some light? The redirect would redirect people visiting an old blog post to a new page:
old blog post: https://www.horizonhomes-samui.com/horizon-homes-construction/
new page: https://www.horizonhomes-samui.com/construction/
The redirect code I'm using is:
Redirect 301 /horizon-homes-construction/ https://www.horizonhomes-samui.com/construction/
Possibly Relevant Info
My site is a Wordpress site.
I also tried adding a "RewriteEngine On" line to the top, but that did not resolve the issue.
The htaccess file I'm editing is located in my WordPress root directory (along with wp-content, wp-admin, index.php, etc).
The instructions I'm following for adding the 301 redirect are from this guide.
Thanks.
When you don't have a lot of control over the server, which is the case for a lot of wordpress sites, a plugin is better than trying to update the .htaccess file.
I am sure there are a lot of good plugins that do this. This one has worked for us.
https://wordpress.org/plugins/redirection/
With the help of my server admin, I ascertained why this 301 redirect was not working. It is because my site is on an Nginx server, so any redirects added to htaccess will not be read by the server. My server admin was able to add the redirects properly.
In wordpress, I want to remove page: http://domain.com/2016/03/16/
I mean: when somebody access this page, content is not found 404
There are multiple ways to do this. First and easier is using a plugin. This one for example:
https://wordpress.org/plugins/simple-301-redirects/
Or you can edit your .htaccess file located on the root of your website. Then add a rule to redirect the page you want to the 404 page of your site.
#This allows you to redirect /2016/03/16/ to /404/ (assuming the path to your 404 page is /404/
Redirect 301 /2016/03/16/ http://domain.com/404/
I've recently deployed a new Wordpress site that was replacing an existing site. So I've set up a whole bunch of 301 redirects in the .htaccess file.
I'm having troubles with one particular redirect though:
Redirect 301 /images/ http://domain.com/
I seem to have no trouble with any other redirects using exactly the same syntax. Could the 'images' directory be some sort of reserved word somehow? Not even sure where to start troubleshooting this!
Any ideas?
We need to redirect everything from an old domain to a specific page on the new domain.
Our .htaccess looks like this:
Redirect 301 / http://www.example.com/specific-page/
Problem is that it doesn't work. When we go to the old domain, we are redirected to http://www.example.com/ and not http://www.example.com/specific-page/
Any idea how we can fix this?
Thanks,
Louisa
An option is to use php and redirect with the code below. Place it at the top of the index on your old domain. If you could paste the headers that would help us debug the problem.
header("Location: http://www.example.com/specific-page/",TRUE,301);