Wordpress, Redirects and HTacess file
-
Converted site to wordpress and having a bit of trouble with re-directs not redirecting.
Could somebody tell me whether redirects go before the
`# BEGIN WordPress` or after the # END wordpress or immediately after this bit -
<code># BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On RewriteBase /</ifmodule></code>
section of the code within my htacess file? Just wondered if this is the cause of my problems! Cheers Ted
-
Hi Takeshi,
I only need to get 2 redirects working, so I thought a plug in was a bit overkill.
They are already present in the htaccess file from the previous site (I'm running wordpress from a sub-folder but switched everything over as per the wordpress instructions.
Got the following which doesn't seem to work (any ideas what is wrong?)
RewriteCond %{HTTP_HOST} ^example.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.example.co.uk$
RewriteRule ^/?$ "http://www.newsite.co.uk" [R=301,L]The above should redirect from example.co.uk OR www.example.co.uk
and the is that is giving me a few problems is
RewriteCond %{HTTP_HOST} ^newsite.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.newsite.co.uk$
RewriteRule ^oldpage.htm$ "http://www.newsite.co.uk/new-page.htm" [R=301,L]That should redirect from newsite.co.uk/oldpage.htm
All these are already existing redirects done previously through my htaccess file but not too sure if the coding is correct for a wordpress based site but the last one above does not seem to be working at all!
Any ideas would be great and a big help!
Cheers
Ted -
They would go after the #END wordpress line. You can also install the plugin called "Redirection" which will allow you to put in 301 redirects without mucking about with your .htaccess file.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Would you recommend changing image file names retroactively?
We'll be optimizing file names moving forward, but it hasn't been done in the past. I have probably 1,500 that would need to be changed, so want to make sure it's a valuable use of time/worth the effort. 🙂 Also, has anyone used Media File Renamer for wordpress? Seems this would be a good way to rename files without needing to reupload everything. Thanks!
Image & Video Optimization | | jennafrye0 -
What's better for SEO an Optimized Image URL vs Optimized Image File Name?
I would like to know what is best practice for optimizing images for our website. Is it better to give an Image an optimized filename Or an optimized URL for SEO? Or is it better to do both? Would there be any harm in doing both if they are identical in their format? Any help would be greatly appreciated. With thanks, Kate
Image & Video Optimization | | K_borg0 -
Image ALt Tag in Sliders and Modules (Banner) in Joomla/Wordpress
Is it possible to do SEO for images in Sliders and Banner modules in Joomla? I would like to add ALT tags and Titles for those, if possible.
Image & Video Optimization | | ArthurRadtke0 -
WordPress image file names SEO question
I’m using a plugin to upload images directly from Adobe Lightroom to WordPress and while the process is very convenient it adds “wpid-“ to the beginning of every image file name, so my “seo-friendly-image-title.jpg” becomes “wpid-seo-friendly-image-title.jpg”. The plugin author claims that it’s a WordPress thing and there isn’t anything he can do about it, yet it doesn’t happen when using the same plugin to upload to the NextGen Gallery Plugin instead of the built in WordPress media manager. I’m not really a fan of NextGen though so I’d rather use the built in WordPress media management. This is obviously an SEO forum not a WordPress troubleshooting forum, but I wanted to give a bit of background. My question is whether that “wpid-” at the beginning of all my image file names is going to cause any sort of SEO issue. If not, I won’t worry about it, but if it does I’ll have to either find another plugin or just go back to exporting from Lightroom to the desktop and then uploading through WordPress. Thanks in advance for any input.
Image & Video Optimization | | StephenWeigel0 -
301 redirect .com to .co.uk to improve position in UK serps
I've set up a new campaign for a website specifically targetting a service offered in a specific UK city. It's on a .com domain, and we've managed to get a few powerful links and while its only been going for a few weeks it's starting to get decent rankings in Google.com but is nowhere to be seen in Google.co.uk. It's getting good traffic but not traffic that converts probably because it's targeted to the UK and most visitors are from the US. I've just set up Google places, changed geo targeting to the UK, I've moved over to a UK host and we're targetting UK sites for links. I think while things are still at an early stage it would be a good idea to move everything that's on the .com over to the .co.uk with a 301 redirect and send all new links over to the .co.uk. What do you guys think? Is this a good idea? Thanks
Image & Video Optimization | | sandanista0 -
301 Redirect affects Google Places Listing?
Hi, A client of ours has a Google Places Listing but over the last few days we noticed that two duplicate listings have appeared with exactly the same information as the original listing. Only difference is the domain names. I did some investigation and my client says that a company cold called them recently and sold them two domain names www.bandbinbanbury.co.uk andwww.accommodationinbanbury.co.uk and it seems these two are redirecting to the main site which sits on www.hanwellhouse.com My question is can this cause that the redirected listing now appear instead of the original google places listing? Any help will be appreciated
Image & Video Optimization | | InTouchMarketing560 -
Self Hosting Videos in Wordpress
Hi, I'm trying to figure out the best way to host my own videos on my website in addition to uploading them to YouTube. My site is Wordpress-based, and I use Pages for the main landing pages, Posts to create the different products I offer. Is there a good way to upload my videos of each product into those Posts for SEO purposes? Maybe there's a specific plugin that I should be using? Thanks in advance, Shawn
Image & Video Optimization | | darkgreenguy0 -
Google’s algorithm on file size. Use IFrame or not?
With page size being a big factor in Google’s algorithm what’s the best way to implement a flash file without jeopardizing rankings? What’s your thoughts on embedding the video in an IFrame?
Image & Video Optimization | | SEO-Team0