Search the Community
Showing results for tags 'seo redirection'.
We're launching a new version of our website and I need to create redirects from old pages to their new counterparts at different URLs. An example rule that I've created is Redirect 301 /solar-energy-for-business /solar-energy/commercial-solar/ However when I visit the redirected URL it shows up in the address bar as: https://staging.renovaenergy.com/solar-energy/commercial-solar/?it=solar-energy-for-business We're creating these redirects for SEO purposes and they need to not have additional URL parameters being added. This line in the .htaccess file is adding the original URL as a parameter. RewriteRule ^(.*)$ index.php?it=$1 [L,QSA] Does ProcessWire use this parameter for a purpose? What is the best way to create these redirects without this parameter?
Like a lot of people, processwire sites I work on started life in other CMSs like Joomla and Wordpress where they've outgrown the scope of CMS with clients asking for more and more bespoke content. For some of my clients, SEO is a big issue as we've spent year's building up these strong pages. When creating a new site in processwire the url structure can be vastly different from the original site meaning search engines will mostly have broken links damaging the sites ranking. There's many other techniques to achieve this such as using htaccess but that can become very complicated and way to complex for most clients to manage themselves so I use this technique. I create a template with two fields, title and redirect. 'redirect' is a page select field. The title must match the url of the old page and the redirect is as you might guess, the page to redirect to. You can build up the url with parent and child pages to match the old site url. My template looks like this: <?php /* * Template: redirectPage * * Used to redirect URL adress to other page with 301 HTTP code */ $session->redirect($page->redirect->url); ?> The 301 let's google know that the page has permanently moved. See here for their explanation. Then, just work your way through your pages and URLS. See this little screenomatic for a visual. Screenomatic youtube