WordPress File Extensions - mod-rewrite

I am converting a Frankenstein monster of a website into a Wordpress. The first challenge I am facing is to keep our old URLs for Google. this site has several .PHP pages and several HTML pages.
Our Google ranking is high in several key search terms. So it is important to me that page addresses remain the same. So far I cannot find a plugin which would allow my Wordpress site to have both .HTML and .PHP permalinks.
I am familiar with mod_rewrite() and have used it before, but when I inserted a rewrite rule into the existing Wordpress .htacces file, it broke the routing altogether.
I would greatly appreciate any input from your Wordpress gurus :)

You need to do 301 redirect and here's an example .htaccess.
Redirect 301 /oldpage2.html http://www.yoursite.com/folder/

Related

Can I create a 301 redirect from www.xcompany.com to shop.xcompany.com?

I work for xcompany. I am wondering if it is possible to set up a 301 redirect from our site http://shop.xcompany.com/ to our site http://www.xcompany.com/ and if possible, what would the rewrite rules be?
The old page that existed on the former URL has been removed from the site and a similar page has been created on the latter URL and we need to make sure any traffic is directed to the new page.
Thanks!!
RewriteRule ^old/URL/path$ http://example.com/new/path [R=301,L]
To redirect from oldsite.com to newsite.com you can use the following redirect in /oldsite/.htaccess
Redirect 301 / http://newsite.com/
Redirecting one domain to another domain is very much easier than before only if you are well familiar with CMSs like WordPress. There are plenty of redirect plug-ins available in WordPress that make our efforts easier and quicker.
301 redirection must be done if you have made any changes to the older URL and it will give link juices without losing its ranking, backlinks, and all others.
You need not worry about anything. Redirect your older one to new one. Then Google webmaster tool will give a report if your new site causes crawling errors. Hope it'd be helpful.

Umbraco 7 URL rewriting

I am trying to add url rewrites
My current URL http://some_domain.co.uk/category/page_name/
I am trying to keep existing site urls functioning with below URL
http://some_domain.co.uk/category/page_name.htm
Any help appreciated.
Thanks!
i would highly recommend keeping the current URL structure, it's cleaner, and maintainability will be easier.
If your worried about the SEO or the dead links after the new site goes live then how about doing 301 redirect instead?
Umbraco has a plugin that helps you do 301 redirect and keep track of all the 404 pages, and you can view the report and 301 redirect those 404 pages.
http://our.umbraco.org/projects/developer-tools/301-url-tracker
In the example above,
http://some_domain.co.uk/category/page_name.htm
will get redirected to
http://some_domain.co.uk/category/page_name/

Revamped Joomla site to Google search engine

I am about to upload a revamped site of Joomla (update from 1.5 to 2.5 + changes).
I currently have a test bed sub-domain that I am currently working on.
In few days I am about to do the swap and replace the old site with the new one.
I am worrying about Search Engines and specifically Google.
The site currently has a very good rank (appears 2nd in the search), what actions do I have to take in order to be updated and preserve the rank? (except submitting the new sitemap I guess).
It's not a difficult task but because I don't have the option to be wrong or mistakes to be done I an asking for a more "expert" advice.
Thanks in advance.
The Upgraded version of the site have any URL changes like images or pages Then you have to take the things more carefully and redirect all old URLs to the New one with 301 redirect.
Otherwise Google will consider those pages are not exists and it will loose page rank.
Also this question is not well suits for this platform, Its better to ask on Webmaster.
In this way you will not loose old page urls ranks.
For making old non-existing URLs to new corresponding url,
on your htaccess file.
RewriteEngine on
RewriteRule your_old_url_without_domain http://www.domain.com/new_corresponding_url [R=301,L]
You're using Nginx Server so the htaccess doesn't work for try to use Nginx htaccess converter.
for more details
Hope it make sense..

Joomla SEO remove index.php through canonical?

I've run my Joomla 1.5 site through the Google Webmaster Tools, it's telling me my site has multiple pages with double title-tags.
Here's an example:
http://www.example.com/section/page
http://www.example.com/index.php/section/page
I'm using the default .htaccess-file from Joomla 1.5, what should I add to prevent Google to see things like this?
Perhaps a canonical-tag, but a rewrite would be mostly loved for, right?
Thanks in advance!
Either will work.
Either:
An htaccess instruction following the correct logic with a 301 redirect from index.php to clean, or
A dynamic canonical tag placed on each page template (generally in Joomla this will fix it, as placing the code on one template will (by default) place it on both the / and /index.php pages.

Magento mini search form from secure pages

I've run into a catch-22 with the search form that hopefully someone can help me with. From any of the secure pages in our Magento store (My Account, Checkout, etc) if you use the mini search form in the header, it takes you to a secure search results page https://oursite.com/catalogsearch/result. This results in a browser warning because there is unsecure content on that page. I thought I could fix this by modifying the CatalogSearch Helper class so that the getResultUrl functions always returns an http: link. However, this results in the browser warning you that you are about to send form data over a non-secure connection. So I can't seem to find a solution that doesn't look dangerous to the user.
Any ideas?
I know this is not the proper EAV/MVC/1000 lines of XML Magento module way of doing it, however, since this is a straightforward http/https problem you can put a couple of lines in .htaccess to get your search box behaving correctly:
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^catalogsearch http://www.example.com/catalogsearch/ [R=301,L]
The right way to fix this is not to use mixed content on that page. Magento can usually handle any page over HTTPS if it is requested to do so, so find the assets that are hardcoded over http:// and fix them to respect the current protocol properly.
For me the incorrect url got stuck in cache (we had heavy cache on the live server) and that caused the security warning for me. Hope this helps someone.
The question should be - why is this happening?
Doing a search on a non-secure page will yield results on a non-secure page.
After having visted a secure page, searching on a non-secure page will yield results on a secure page - how does this make any sense? What is the purpose of this?

Resources