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?
Related
I would like to redirection from the whole old subdirectory to new location in the same website with htaccess file. (I run wordpress website with redirection plugins but it take to much resources by adding more records.)
For example, if I want to do the Redirect 301 process from
www.mydomain.com/olddirectory/page%
to
www.mydomain.com/newdirectory/specific-url/
I have tried to search the example of using regular expression but I can't find them. Please suggest me about this matter.
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.
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.
I have WordPress installed and I have some old URls indexed, for example:
http://www.example.com/article-title.html
They were working before, but now I changed my URl structure so if I type in Web browser:
http://www.example.com/article-title/
The new one is working but if I visit my old URL with .html, it gives me error 404.
Is there a way for rewrite those old to new one?
Maybe 301 SEO redirect?
Thanks!
go into your .htaccess on your server and at the top of the file you can add something like this
Redirect 301 /article-title.html http://www.example.com/article-title/