301 redirectmatch
-
I think I'm starting to loss my mind.
I have worked with regex before with very little problems how with my redirects nothing appears to be working. A little guidance is needed!
The Low down
I have a site with Joomla CMS backend.
The site is undergoing and SEO overhaul
I was simple hoping to use a 301 redirect o these old pages that are now a causing 404's
The addresses
/index.php?option=com_content&view=article&id=46&Itemid=53_blank
/shop/product.php?id_product=11
I have tried the following redirects but no avail
RedirectMatch 301 ^/shop/product.php?id_product=11$ http://www.nomitang.com/index.php/en/vm_getaway_w this does not work at all
if I remove the ?.....ending then I can simply redirect the product page but this is not what we need.
Why does RedirectMatch not register anything after the "?"?
I also tried this
RewriteCond %{HTTP_HOST} ?option=com_content&view=article&id=46&Itemid=53_blank [NC]
RewriteRule ^(.*)$ http://www.nomitang.com/ [R=301,L]But this also didn't work.
Please could someone tell me how to redirect these url's and how to deal with the extrension
Thanks
Stefan
-
Hi
I'm actually using 2.5.
I will take a look at the module but for my own piece of mind, I would like to understand how to use Redirectmatch\RewriteRule better.
Thanks
Stefan
-
Hey Stefan,
You didn’t mentioned the version of Joomla you are using at the moment so it’s difficult to come up with the exact solution but why don’t you use URL redirection module
Check this out and this might help! http://www.seoeducation.in/how-to-redirect-url%E2%80%99s-in-joomla-with-sh404sef-module
Thanks!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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
-
What to do with old content after 301 redirect
I'm going through all our blog and FAQ pages to see which ones are performing well and which ones are competing with one another. Basically doing an SEO content clean up. Is there any SEO benefit to keeping the page published vs trashing it after you apply a 301 redirect to a better performing page?
Technical SEO | | LindsayE0 -
Can i do 301 redirect
So this is what im doing, 301 redirect to my site/allen-webdesign points to main domain Allen is the city i have a page called local-webdesign with all the cities. Will this improve my ranking or should i stop?
Technical SEO | | jsdfw0 -
Canonical vs 301 for index.php
Hello, we found recently quite a big error our index.php file had no canonical tag nor was a 301 redirect. So we put a canonical tag to it that it's the main www.examle.com duplicate . Now is there any difference in regards to link juice or Google 301 vs canonical tag ? I read that moz did a 301 from their index php. I understand one difference is that user then can Type in the URL if no 301, but I'm interested about ranking effect of it.
Technical SEO | | advertisingcloud0 -
Find all old links from a site to 301
We worked on this site a while ago - http://www.electric-heatingsupplies.co.uk/ Whilst we did a big 301 redirect exercise, I wanted to check that we "got" all of them. Is there a historical way I can check all the old indexed links to make sure they correlate to the new links? Thanks!!
Technical SEO | | lauratagdigital0 -
Remove html file extension and 301 redirects
Hi Recently I ask for some work done on my website from a company, but I am not sure what they've done is right.
Technical SEO | | ulefos
What I wanted was html file extensions to be removed like
/ash-logs.html to /ash-logs
also the index.html to www.timports.co.uk
I have done a crawl diagnostics and have duplicate page content and 32 page title duplicates. This is so doing my head in please help This is what is in the .htaccess file <ifmodule pagespeed_module="">ModPagespeed on
ModPagespeedEnableFilters extend_cache,combine_css, collapse_whitespace,move_css_to_head, remove_comments</ifmodule> <ifmodule mod_headers.c="">Header set Connection keep-alive</ifmodule> <ifmodule mod_rewrite.c="">Options +FollowSymLinks -MultiViews</ifmodule> DirectoryIndex index.html RewriteEngine On
# Rewrite valid requests on .html files RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^ %{REQUEST_URI}.html?rw=1 [L,QSA]
# Return 404 on direct requests against .html files RewriteCond %{REQUEST_URI} .html$
RewriteCond %{QUERY_STRING} !rw=1 [NC]
RewriteRule ^ - [R=404] AddCharset UTF-8 .html # <filesmatch “.(js|css|html|htm|php|xml|swf|flv|ashx)$”="">#SetOutputFilter DEFLATE #</filesmatch> <ifmodule mod_expires.c="">ExpiresActive On
ExpiresByType image/gif "access plus 1 years"
ExpiresByType image/jpeg "access plus 1 years"
ExpiresByType image/png "access plus 1 years"
ExpiresByType image/x-icon "access plus 1 years"
ExpiresByType image/jpg "access plus 1 years"
ExpiresByType text/css "access 1 years"
ExpiresByType text/x-javascript "access 1 years"
ExpiresByType application/javascript "access 1 years"
ExpiresByType image/x-icon "access 1 years"</ifmodule> <files 403.shtml="">order allow,deny allow from all</files> redirect 301 /PRODUCTS http://www.timports.co.uk/kiln-dried-logs
redirect 301 /kindling_firewood.html http://www.timports.co.uk/kindling-firewood.html
redirect 301 /about_us.html http://www.timports.co.uk/about-us.html
redirect 301 /log_delivery.html http://www.timports.co.uk/log-delivery.html redirect 301 /oak_boards_delivery.html http://www.timports.co.uk/oak-boards-delivery.html
redirect 301 /un_edged_oak_boards.html http://www.timports.co.uk/un-edged-oak-boards.html
redirect 301 /wholesale_logs.html http://www.timports.co.uk/wholesale-logs.html redirect 301 /privacy_policy.html http://www.timports.co.uk/privacy-policy.html redirect 301 /payment_failed.html http://www.timports.co.uk/payment-failed.html redirect 301 /payment_info.html http://www.timports.co.uk/payment-info.html1 -
Automatically write Mass 301 redirects for csv
Hi Guys Does anyone know if there is away to write say 30 x 301 redirects in one go? I have a list from a client with old links and new links and I want to do it all at once. Any suggestions would be appreciate?
Technical SEO | | Cocoonfxmedia0 -
301 Redirect Questions
I have a site I built on a wisiwig editing platform that will not allow a 301 redirect. The site has already been remade and I need to point it to another domain. To do the redirect, can I change it to another domain host that will allow a 301 or will that make me loose the authority of the site? I may not be able to move the content of the site. Please help.
Technical SEO | | photoseo10 -
Rel - canonical vs 301 redirect
I have multiple product pages on my site - what is better for rankings in your experiance? If I 301 the pages to 1 correct version of the product page - or if I rel caanonical to the one correct page?
Technical SEO | | DavidS-2820610