website shows 500 code error after issuing 301-redirect - http-status-code-301

I have a long list of redirects, about 1300. Somewhere along these 1300 301-redirects something went wrong. Whenever I upload my .htaccess file I get a 500 code on my website.
I dont know how to show you guys the code as am not allowed to post more than 30k characters.
Any help or ideas is deeply appreciated.
redirect 301 /wp/baddsoffa-trento/ http://www.living.se/
redirect 301 /wp/golvlampa-bono/ http://www.living.se/
redirect 301 /wp/golvlampa-brooklyn/ http://www.living.se/
redirect 301 /wp/atlanta-hornsoffa-2/ http://www.living.se/
redirect 301 /wp/hornsoffa-london-2h25/ http://www.living.se/
redirect 301 /wp/kandelaber-multi/ http://www.living.se/
redirect 301 /wp/kladhangare-knax-2-2/ http://www.living.se/
redirect 301 /wp/knax-imperial/ http://www.living.se/
redirect 301 /wp/fatolj-fotpall-conto/ http://www.living.se/
redirect 301 /wp/ullmatta-glaze/ http://www.living.se/
redirect 301 /wp/spegel-rennes/ http://www.living.se/
redirect 301 /wp/ullmatta_chocolate/ http://www.living.se/
redirect 301 /wp/fatolj-anelo/ ‹http://www.living.se/
redirect 301 /wp/spegel-rochelle/ http://www.living.se/
redirect 301 /wp/goa-coffetable-distress-saj-1059d/ http://www.living.se/
redirect 301 /wp/soffbord-egg/ http://www.living.se/
redirect 301 /wp/spegel-nante/ http://www.living.se/
redirect 301 /wp/amadeus-lounge-chair-2/ http://www.living.se/
redirect 301 /wp/byra-nancy/http://www.living.se/
redirect 301 /wp/matbord-wasa/ http://www.living.se/
redirect 301 /tokyo-3-sits-soffa/ http://www.living.se/
redirect 301 /wp/liggstol-movie/ http://www.living.se/
redirect 301 /wp/living-fyller-15-ar-3/ http://www.living.se/
redirect 301 /matbord-ascona-2/ http://www.living.se/
redirect 301 /?variations=beige http://www.living.se/
redirect 301 /vaggklocka-london-vintage/ http://www.living.se/
redirect 301 /startsida/ http://www.living.se/
redirect 301 /sortiment/soffor.html http://www.living.se/mobler-i-malmo/soffor/
redirect 301 /stol-zipper/ http://www.living.se/mobler-i-malmo/stolar/
redirect 301 /sangbord-striped/ http://www.living.se/mobler-i-malmo/sovrum/
redirect 301 /pappelina-siri/ http://www.living.se/
redirect 301 /wp/galge-zitti-svart-2/ http://www.living.se/mobler-i-malmo/accessories/
redirect 301 /wp/mobelvard-textilkit/ http://www.living.se/mobler-i-malmo/mobelvard/
redirect 301 /wp/matbord-salto/ http://www.living.se/mobler-i-malmo/matbord/
redirect 301 /wp/fatolj-therese/ http://www.living.se/mobler-i-malmo/fatoljer/
redirect 301 /wp/vintage-lykta-40/ http://www.living.se/mobler-i-malmo/belysning/
redirect 301 /plad-chenille-text/ http://www.living.se/mobler-i-malmo/kuddar-pladar/
redirect 301 /wp/visible-mocca-ryamatta/ http://www.living.se/mobler-i-malmo/mattor/
redirect 301 /plastmatta-pappelina-owen/page/2/ http://www.living.se/mobler-i-malmo/mattor/
redirect 301 /etikett/svartmalad/ http://www.living.se/
redirect 301 /wp/tag/playsam/ http://www.living.se/
redirect 301 /wp/hallbank-point/ http://www.living.se/mobler-i-malmo/hallmobler/
redirect 301 /wp/bohuslan/ http://www.living.se/
redirect 301 /golvlampa-rebell/ http://www.living.se/mobler-i-malmo/belysning/
redirect 301 /wp/soffa-lazy/ http://www.living.se/mobler-i-malmo/soffor/
redirect 301 /wp/vagghangd-ljusstake/ http://www.living.se/mobler-i-malmo/accessories/
redirect 301 /wp/soffbord-java/ http://www.living.se/mobler-i-malmo/soffbord/
redirect 301 /wp/limhamn-60/ http://www.living.se/
redirect 301 /wp/byra-harlequin/ http://www.living.se/mobler-i-malmo/forvaring/
redirect 301 /etikett/kontorsstol/ http://www.living.se/mobler-i-malmo/stolar/
redirect 301 /wp/kategori/soffbord/ http://www.living.se/mobler-i-malmo/soffbord/
redirect 301 /wp/kategori/india_collection/ http://www.living.se/
redirect 301 /wp/tray-soffbord-2/ http://www.living.se/mobler-i-malmo/soffbord/
redirect 301 /wp/kategori/ovrigt/ http://www.living.se/
redirect 301 /wp/tradgardsset-capri/ http://www.living.se/
redirect 301 /wp/soffbord-kampanj/ http://www.living.se/
redirect 301 /wp/snurrfatolj-living/ http://www.living.se/mobler-i-malmo/fatoljer/
redirect 301 /wp/fatolj-cayenne/ http://www.living.se/mobler-i-malmo/fatoljer/
redirect 301 /wp/kategori/rea/ http://www.living.se/mobler-i-malmo/rea/
redirect 301 /wp/sittpuff/ http://www.living.se/mobler-i-malmo/fatoljer/
redirect 301 /wp/soffa-time-3a-2/ http://www.living.se/mobler-i-malmo/soffor/
redirect 301 /wp/fatolj-chester/ http://www.living.se/mobler-i-malmo/fatoljer/
redirect 301 /etikett/laminat/ http://www.living.se/
redirect 301 /wp/matbord-zata/ http://www.living.se/mobler-i-malmo/matbord/
redirect 301 /wp/matbord-matrix/ http://www.living.se/mobler-i-malmo/matbord/
redirect 301 /wp/trappstol-zitti-svart/ http://www.living.se/mobler-i-malmo/stolar/
redirect 301 /wp/sommarmobel-santorini-2/ http://www.living.se/mobler-i-malmo/outdoor/
redirect 301 /wp/black-jack-soffa/ http://www.living.se/mobler-i-malmo/soffor/
redirect 301 /wp/tag/liniedesign/ http://www.living.se/
redirect 301 /wp/sangbord-striped/ http://www.living.se/mobler-i-malmo/sovrum/
redirect 301 /wp/fatolj-manchester-2/ http://www.living.se/mobler-i-malmo/fatoljer/
redirect 301 /wp/byra-cubio/ http://www.living.se/mobler-i-malmo/forvaring/
redirect 301 /wp/stol-athen/ http://www.living.se/mobler-i-malmo/stolar/
redirect 301 /wp/tag/lykta/ http://www.living.se/mobler-i-malmo/belysning/
redirect 301 /wp/sidobord-marina/ http://www.living.se/
redirect 301 /wp/arctic-tv-bank-2/ http://www.living.se/mobler-i-malmo/tv-mediabankar/
redirect 301 /wp/stol-hovdala-2/ http://www.living.se/mobler-i-malmo/matbord/
redirect 301 /wp/tag/hylla/ http://www.living.se/mobler-i-malmo/hallmobler/
redirect 301 /wp/lampbord-cabana/ http://www.living.se/
redirect 301 /wp/stol-bella/ http://www.living.se/mobler-i-malmo/stolar/
redirect 301 /knax-turquoise/ http://www.living.se/
redirect 301 /wp/soffa-chelsea/ http://www.living.se/mobler-i-malmo/soffor/
redirect 301 /wp/tv-bank-azzaro-2/ http://www.living.se/mobler-i-malmo/tv-mediabankar/
redirect 301 /wp/kladhangare-knax-3/ http://www.living.se/mobler-i-malmo/accessories/
redirect 301 /etikett/hallbank/ http://www.living.se/mobler-i-malmo/hallmobler/
redirect 301 /wp/dekorations-tofs/ http://www.living.se/
redirect 301 /wp/tag/nero/ http://www.living.se/
redirect 301 /wp/visible-silver-ryamatta/ http://www.living.se/mobler-i-malmo/mator/
redirect 301 /fatolj-bern/ http://www.living.se/mobler-i-malmo/fatoljer/
redirect 301 /wp/lyx-kakfat/ http://www.living.se/
redirect 301 /etikett/byra/ http://www.living.se/mobler-i-malmo/forvaring/
redirect 301 /wp/knax-summer/ http://www.living.se/mobler-i-malmo/matbord/
redirect 301 /kladhangare-zitti-svart/page/2/ http://www.living.se/mobler-i-malmo/accessories/
redirect 301 /wp/skohylla-zitti-3/ http://www.living.se/mobler-i-malmo/hallmobler/
redirect 301 /wp/matbord-saturn/ http://www.living.se/mobler-i-malmo/matbord/
redirect 301 /wp/arctic-byra/ http://www.living.se/mobler-i-malmo/forvaring/
redirect 301 /wp/lounge-soffa-3-divan/ http://www.living.se/mobler-i-malmo/soffor/
redirect 301 /etikett/divan/ http://www.living.se/mobler-i-malmo/soffor/
redirect 301 /wp/matbord-bono-atlantic/ http://www.living.se/mobler-i-malmo/matbord/
redirect 301 /wp/soffa-largo-2/ http://www.living.se/mobler-i-malmo/soffor/
redirect 301 /etikett/glas/ http://www.living.se/mobler-i-malmo/accessories/
redirect 301 /wp/tag/matbord-2/ http://www.living.se/mobler-i-malmo/matbord/
redirect 301 /plad/comment-page-1/ http://www.living.se/mobler-i-malmo/kuddar-pladar/
redirect 301 /wp/tag/betong/ http://www.living.se/
redirect 301 /arctic-grey-matta/ http://www.living.se/mobler-i-malmo/mattor/
redirect 301 /etikett/pilasterhylla/ http://www.living.se/mobler-i-malmo/hallmobler/
redirect 301 /wp/tag/hjellegjerde/ http://www.living.se/mobler-i-malmo/matbord/
redirect 301 /pappelina-alve/feed/ http://www.living.se/
redirect 301 /citybike-tavla/ http://www.living.se/
redirect 301 /fatolj-havanna/feed/ http://www.living.se/
redirect 301 /slagbord-viggso/page/2/ http://www.living.se/
redirect 301 /mediabank-base-135/feed/ http://www.living.se/
redirect 301 /vitrinskap-azzaro-3/feed/ http://www.living.se/
redirect 301 /mobler-i-malmo/outdoor/capri-delux-tradgardsstol-2/ http://www.living.se/
redirect 301 /wp/knax-turquoise/ http://www.living.se/
redirect 301 /weeb_slides/apollo-baddsoffa-nu-pa-lager/ http://www.living.se/
redirect 301 /grapatinerade-ljusstakar-i-tra/ http://www.living.se/
redirect 301 /etikett/anilinlader/ http://www.living.se/
redirect 301 /wp/tag/vintage/ http://www.living.se/
redirect 301 /etikett/kista/ http://www.living.se/
redirect 301 /wall-smal-bokhylla/ http://www.living.se/
redirect 301 /wp/kladhangare-zitti-2/ http://www.living.se/
redirect 301 /wp/farskinn-massor-av-farger/ http://www.living.se/
redirect 301 /wp/bordslampa-diva/ http://www.living.se/
redirect 301 /wp/heaven-2-sits-soffa/ http://www.living.se/
redirect 301 /wp/dorrmatta/ http://www.living.se/
redirect 301 /ullmatta-glaze/page/2/ http://www.living.se/
redirect 301 /pappelina-lilo/page/2/ http://www.living.se/
redirect 301 /wp/tag/hogblank/ http://www.living.se/
redirect 301 /wp/arctic-bedside/ http://www.living.se/
redirect 301 /wp/stol-birka/ http://www.living.se/
redirect 301 /wp/kub-2-lador-sa-3112/ http://www.living.se/
redirect 301 /wp/stol-oregon/ http://www.living.se/
redirect 301 /etikett/ekfaner/ http://www.living.se/
redirect 301 /wp/kladhangare-zitti/ http://www.living.se/
redirect 301 /wp/sa-3117/ http://www.living.se/
redirect 301 /soffa-largo/feed/ http://www.living.se/
redirect 301 /ullmatta-cos/page/2/ http://www.living.se/
redirect 301 /wp/alla-soffor-och-fatoljer/ http://www.living.se/
redirect 301 /arctic-white-matta/feed/ http://www.living.se/
redirect 301 /wall-smal-bokhylla/feed/ http://www.living.se/
redirect 301 /goa-louvre-sideboard-sa-6012/feed/ http://www.living.se/
redirect 301 /soffbord/lampbord-multe/ http://www.living.se/
redirect 301 /nyheter/funktionsfatolj-tampa/ http://www.living.se/
redirect 301 /soffbord-marocko/feed/ http://www.living.se/
redirect 301 /goa-reclaimed-trunk-sa-6006/feed/ http://www.living.se/
redirect 301 /pappelina-alve/page/2/ http://www.living.se/
redirect 301 /fatboy-marimekko/feed/ http://www.living.se/
redirect 301 /etikett/troels/ http://www.living.se/
redirect 301 /tavla-beatiful-flower/feed/ http://www.living.se/
redirect 301 /mobler-i-malmo/soffbord/louvre-reclaimed-trunk-sa-6006/ http://www.living.se/
redirect 301 /tavla-beatiful-moment/feed/ http://www.living.se/
redirect 301 /wall-bred-bokhylla/feed/ http://www.living.se/
redirect 301 /goa-soffbord-yo-236/feed/ http://www.living.se/
redirect 301 /fotpall-apollo/feed/ http://www.living.se/
redirect 301 /goa-louvre-plasma-cabinet-sa-6013/feed/ http://www.living.se/
redirect 301 /plenty-multi-matta/feed/ http://www.living.se/
redirect 301 /soffbord-limhan-90/feed/ http://www.living.se/
redirect 301 /mobler-i-malmo/accessories/julhjarta-lilla/ http://www.living.se/
redirect 301 /tag/hall/feed/ http://www.living.se/
redirect 301 /puff/page/2/ http://www.living.se/
redirect 301 /reason-matbord/feed/ http://www.living.se/
redirect 301 /wp/sommarmobel-riva/ http://www.living.se/
redirect 301 /wp/soffbord-fleur/ http://www.living.se/
redirect 301 /wp/fatolj-palma/ http://www.living.se/
redirect 301 /mattor/plastmatta-pappelina-vera-one-5/ http://www.living.se/
redirect 301 /voice-10/feed/ http://www.living.se/
redirect 301 /plastmatta-pappelina-vera-one-5/page/2/ http://www.living.se/
redirect 301 /wp/divansoffa-malta/ http://www.living.se/
redirect 301 /etikett/forvaraing/ http://www.living.se/
redirect 301 /belysning/golvlampa-edison/ http://www.living.se/
redirect 301 /wp/soffa-madrid/ http://www.living.se/
redirect 301 /wp/tavlor/feed/ http://www.living.se/
redirect 301 /byra-saro/page/2/ http://www.living.se/
redirect 301 /soffor/desiree-divansoffa-hoger/ http://www.living.se/
redirect 301 /wp/nightstand-harlequin/feed/ http://www.living.se/
redirect 301 /buffe-tokyo-black/feed/ http://www.living.se/
redirect 301 /brickbord/feed/ http://www.living.se/
redirect 301 /wp/soffa-time-3a/ http://www.living.se/
redirect 301 /tradgardsmobel-capri-de-luxe/feed/ http://www.living.se/
redirect 301 /wp/tag/nero/feed/ http://www.living.se/
redirect 301 /wp/laderfatolj-lotus/ http://www.living.se/
redirect 301 /wp/forvaring-sa-3161/feed/ http://www.living.se/
redirect 301 /wp/kategori/living_collection/page/2/ http://www.living.se/
redirect 301 /soffbord-2-drawers/ http://www.living.se/
redirect 301 /soffor/bakhtiar-soffa-2/ http://www.living.se/
redirect 301 /accessories/julstjarna-110/ http://www.living.se/
redirect 301 /etikett/filt/ http://www.living.se/
redirect 301 /wp/tag/skrivbord/feed/ http://www.living.se/
redirect 301 /etikett/mediabank/ http://www.living.se/
redirect 301 /wp/kategori/nyheter/page/3/ http://www.living.se/
redirect 301 /arctic_azzaro/arctic-sliding-door/ http://www.living.se/
redirect 301 /wp/tag/skrivbord/ http://www.living.se/
redirect 301 /fatoljer/relax-liggfatolj-cerise/ http://www.living.se/
redirect 301 /wp/tag/vitlack/feed/ http://www.living.se/
redirect 301 /wp/tag/hall/ http://www.living.se/
redirect 301 /wp/armbandsur-kyboe/ http://www.living.se/
redirect 301 /wp/vintage-lykta-1768/feed/ http://www.living.se/
redirect 301 /wp/divansoffa-infinity/ http://www.living.se/
redirect 301 /wp/arctic-grey-matta/feed/ http://www.living.se/
redirect 301 /mobler-i-malmo/rea/bistro-stol-2-pack/ http://www.living.se/
redirect 301 /soffor/tresitssoffa-mexico/ http://www.living.se/
redirect 301 /knax-imperial/feed/ http://www.living.se/
redirect 301 /flash/sales.swf http://www.living.se/
redirect 301 /wp/tag/lykat/feed/ http://www.living.se/
redirect 301 /visible-mocca-ryamatta/feed/ http://www.living.se/
redirect 301 /stol-toulouse/feed/ http://www.living.se/
redirect 301 /etikett/matbord-2/ http://www.living.se/
redirect 301 /etikett/svart-ekfaner/ http://www.living.se/
redirect 301 /wp/vision-mediapanel/feed/ http://www.living.se/
redirect 301 /tavla-birds/feed/ http://www.living.se/
redirect 301 /wp/tag/ryamatta/ http://www.living.se/
redirect 301 /wp/tag/wall/ http://www.living.se/
redirect 301 /wp/tag/lykta/feed/ http://www.living.se/
redirect 301 /ovrigt/vintage-spegel/ http://www.living.se/
redirect 301 /soffa-4sits-colorado/feed/ http://www.living.se/
redirect 301 /mobler-i-malmo/hallmobler/havanna-sittbank-gron/ http://www.living.se/
redirect 301 /amadeus-lounge-chair/feed/ http://www.living.se/

the error 500 its a server side error, probably something about your code, syntax or something that needs to be compiled (read) on the server, you should keep and eye on the logs of your app server (apache, tomcat or other u are using) and check whats going on...

As #jpganz answered. 500 error is an internal server error. There is probably an invalid character or some other syntax error in the configuration file which is hidden by its size but should be obvious if you get the line number where the error occurred.
Look at the log files they may help pin point the problem.
If the log files don't show anything helpful you might try to zero in on the problem with manual binary search:
Split the configuration in two.
Load the first half into the server and see if the problem is there, if not load the second half.
Rinse and repeat with until you find the error.
There may be more than one error so you may have to repeat the process.

Related

301 Redirect subpages to new main page

Hi I am new to redirects.
I can get the basic Redirect 301 /page1/ https://example.com/newpage/ redirects to work fine.
I am having an issue with removing a parent page and all of it's child pages and redirecting everything to a new parent page.
The main redirect works:
Redirect 301 /eye-can-hear/ htps://example.com/procedures-services/
But trying to redirect the sub pages
Redirect 301 /eye-can-hear/hearing-services/ https://example.com/procedures-services/
Is redirecting to /procedures-services/hearing-services/ which doesn't exist.
Here is what the .htaccess file looks like, the 2-7 do not redirect properly:
Redirect 301 /eye-can-hear/ https://example.com/procedures-services/
Redirect 301 /eye-can-hear/hearing-services/ https://example.com/procedures-services
Redirect 301 /eye-can-hear/hearing-aids/ https://example.com/procedures-services
Redirect 301 /eye-can-hear/self-test-your-hearing/ https://example.com/procedures-services/
Redirect 301 /eye-can-hear/schedule-your-hearing-evaluation/ https://example.com/procedures-services/
Redirect 301 /eye-can-hear/financing/ https://example.com/procedures-services/
Redirect 301 /eye-can-hear/dual-sensory-wellness/ https://example.com/procedures-services/
Redirect 301 /about-costello-eye-physicians/community-involvement/ https://example.com/about-costello-eye-physicians/in-the-news/
There are some more redirect's but I can only post 7 links. Further down the .htaccess file after some iThemes security stuff is this:
# Stop wordpress username enumeration vulnerability
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{QUERY_STRING} ^/?author=([0-9]*)
RewriteRule ^(.*)$ https://example.com/? [L,R=301]
and also this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Change this lines (2-7) that do not redirect properly to this rewrite:
RewriteEngine On
RewriteRule ^eye-can-hear\/(.*)$ https://example.com/procedures-services [R=301,L]
It's redirect all subpages of /eye-can-hear/* to https://example.com/procedures-services
This line of code worked for me in the .htaccess file:
RedirectMatch 301 /eye-can-hear/(.*) https://example.com/procedures-services
It redirects the page https://example.com/eye-can-hear/ and its subpages to the URL https://example.com/procedures-services
(Answer after two years, but maybe it helps someone)
In the htaccess file, you should put this redirection after all other redirections of subpages:
Redirect 301 /eye-can-hear/ https://example.com/procedures-services/
Your htaccess should be like this:
Redirect 301 /eye-can-hear/hearing-services/ https://example.com/procedures-services
Redirect 301 /eye-can-hear/hearing-aids/ https://example.com/procedures-services
Redirect 301 /eye-can-hear/self-test-your-hearing/ https://example.com/procedures-services/
Redirect 301 /eye-can-hear/schedule-your-hearing-evaluation/ https://example.com/procedures-services/
Redirect 301 /eye-can-hear/financing/ https://example.com/procedures-services/
Redirect 301 /eye-can-hear/dual-sensory-wellness/ https://example.com/procedures-services/
Redirect 301 /eye-can-hear/ https://example.com/procedures-services/

htaccess 301 redirect with question mark

I have list of URL (600 approximately) that needs to be redirected, few URL are:
Redirect 301 /assets?/elfinder1?/elfinder.html http://www.example.com/swiftkanban/
Redirect 301 /backup?/elfinder?/elfinder.html http://www.example.com/swiftkanban/
Redirect 301 /blog?/xmlrpc.php http://www.example.com/blog/
Redirect 301 /blog.feed?type=rss http://www.example.com/blog/
Redirect 301 /m?/ http://www.example.com/swiftkanban/
Redirect 301 /m/ http://www.example.com/swiftkanban/
Redirect 301 /mobile?/ http://www.example.com/swiftkanban/
Redirect 301 /mobile/ http://www.example.com/swiftkanban/
Redirect 301 /SgjRY?/blog?/16-david-blog?/63-who-owns-kanban.html http://www.example.com/blog/who-owns-kanban/
Redirect 301 /support?/about.html http://www.example.com/about-us/
Redirect 301 /support?/about_us http://www.example.com/about-us/
Redirect 301 /support?/aboutus http://www.example.com/about-us/
Redirect 301 /support?/company http://www.example.com/about-us/the-team/
Redirect 301 /support?/contact.html http://www.example.com/contact-us/
Redirect 301 /support?/contact_us http://www.example.com/contact-us/
Redirect 301 /support?/contactus http://www.example.com/contact-us/
The problem is, I cannot do wildcard redirect, and this redirect rule does not work, I tried escaping the question mark using \ but this does not seem to work, can someone point me to the right direction?
Redirect directive cannot match query string. You need to use mod_rewrite based rules and use a RewriteCond directive as example below:
RewriteEngine On
RewriteCond %{THE_REQUEST} /blog\?/xmlrpc\.php [NC]
RewriteRule ^ http://www.example.com/blog/? [L,NE,R=301]
RewriteCond %{THE_REQUEST} /blog\.feed\?type=rss [NC]
RewriteRule ^ http://www.example.com/blog/? [L,NE,R=301]
Trailing ? after /blog/ is for removing pre-existing query string. If you want query string after redirect then remove ? from target URL.
References:
Apache mod_rewrite Introduction
.htaccess tips and tricks

How can I redirect Magento Store URL's to WooCommerce Store URL's?

I am trying to make a 301 redirect from a Magento Store URL to a Woocommerce Store URL. Here is what I used in my .htaccess file:
Redirect 301 /catalog/index.php/customer/account/ /my-account/
That should redirect the Magento Account page to the WooCommerce My Account page. However, when you try to go to /catalog/index.php/customer/account/ on my new site it redirects you to /shop/customer/account/ (which does not exist on my site).
Again, I have another redirect in my .htaccess file:
Redirect 301 /catalog/index.php/greeting-cards.html /product-category/greeting-cards/
And again, /catalog/index.php/greeting-cards.html is redirecting to /shop/greeting-cards.html instead of the URL I specified in my .htaccess file. All the URL's with the base of /catalog/ are redirecting only their base to /shop/. My .htaccess file is working because I have another redirect in there:
Redirect 301 /about_us.php /about-us/
And that redirect works.
There must be some rule from WordPress or WooCommerce that rewrites /catalog/ to /shop/. So how do I redirect a Magento Store URL to a WooCommerce store URL?
I would appreciate any help you can give me. Thanks!
I am running:
WordPress 3.8.3
WooCommerce 2.1.5
Site URL: http://www.thepottersheart.com/
Full .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Redirect 301 /about_us.php /about-us/
Redirect 301 /catalog/ /shop/
Redirect 301 /contact_us.php /contact-us/
Redirect 301 /calendar.php /calendar/
Redirect 301 /what_people_say.php /testimonials/
Redirect 301 /where_we_go.php /where-we-go/
Redirect 301 /catalog/index.php /shop/
Redirect 301 /catalog/index.php/customer/account/ /my-account/
Redirect 301 /catalog/index.php/checkout/cart/ /cart/
Redirect 301 /catalog/index.php/checkout/onepage/ /checkout/
Redirect 301 /catalog/index.php/customer/account/login/ /my-account/
Redirect 301 /catalog/index.php/grace-dvd-and-pottery.html /product-category/grace-dvd/
Redirect 301 /catalog/index.php/greeting-cards.html /product-category/greeting-cards/
Redirect 301 /catalog/index.php/worship-flags-praise-flags.html /product-category/worship-flags-praise-flags/

.htaccess mostly works but generates a few incorrect urls

I'm migrating a website to a different root domain and I'm trying to redirect all old urls to the new ones. Most urls are redirected correctly but a couple get scrambled up. For instance pythonforspss.org/solutions redirects to http://www.spss-tutorials.com/python/solutions rather than http://www.spss-tutorials.com/python.
Since the target urls seem pretty clear to me, I just don't get what's going wrong. It may have to do with the Rewrite rules but I don't see how to fix it.
UPDATE
I tried a lot of modifications but the symptoms are still the exact same. The entire .htaccess (I apologize for the length of it) at this point is:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} pythonforspss\.org$ [NC]
RewriteRule ^get-started$ http://www.spss-tutorials.com/python/ [L,R=301]
RewriteCond %{HTTP_HOST} pythonforspss\.org$ [NC]
RewriteRule ^solutions$ http://www.spss-tutorials.com/python/ [L,R=301]
RewriteCond %{HTTP_HOST} pythonforspss\.org$ [NC]
RewriteRule ^spss-tips$ http://www.spss-tutorials.com/basics/ [L,R=301]
RewriteCond %{HTTP_HOST} pythonforspss\.org$ [NC]
RewriteRule ^glossary$ http://www.spss-tutorials.com/glossary/ [L,R=301]
RewriteCond %{HTTP_HOST} pythonforspss\.org$ [NC]
RewriteCond %{THE_REQUEST} \ /.*index\.php
RewriteRule ^index\.php$ http://www.spss-tutorials.com/python/ [L,R=301]
RewriteRule . /index.php [L]
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
</IfModule>
#First redirect single pages
Redirect 301 /how-to-write-very-short-syntax http://www.spss-tutorials.com/write-shorter-syntax/
Redirect 301 /how-to-suffix-all-variable-names http://www.spss-tutorials.com/suffix-all-variable-names/
Redirect 301 /five-essential-data-checks http://www.spss-tutorials.com/five-essential-data-checks/
Redirect 301 /the-twenty-best-keyboard-shortcuts-for-spss http://www.spss-tutorials.com/the-twenty-best-keyboard-shortcuts-for-spss/
Redirect 301 /assemble-your-own-toolbar http://www.spss-tutorials.com/assemble-your-own-toolbar/
Redirect 301 /disclaimer http://www.spss-tutorials.com/disclaimer/
Redirect 301 /select-variables-by-variable-labels http://www.spss-tutorials.com/select-variables-by-variable-labels/
Redirect 301 /five-reasons-for-not-relying-on-the-journal-file http://www.spss-tutorials.com/five-reasons-for-not-relying-on-the-journal-file/
Redirect 301 /introducing-python-4-installing-and-testing http://www.spss-tutorials.com/introducing-python-4-installing-and-testing/
Redirect 301 /create-your-own-toolbar-tools http://www.spss-tutorials.com/create-your-own-toolbar-tools/
Redirect 301 /concatenate http://www.spss-tutorials.com/concatenate/
Redirect 301 /indentation http://www.spss-tutorials.com/indentation/
Redirect 301 /leave http://www.spss-tutorials.com/leave/
Redirect 301 /convert-a-number-as-a-date-into-a-date-variable http://www.spss-tutorials.com/convert-a-number-as-a-date-into-an-spss-date/
Redirect 301 /introducing-python-2-how-it-basically-works http://www.spss-tutorials.com/introducing-python-2-how-it-basically-works/
Redirect 301 /set-decimals-for-output http://www.spss-tutorials.com/set-decimals-for-output/
Redirect 301 /compute-age http://www.spss-tutorials.com/compute-age/
Redirect 301 /date-variable http://www.spss-tutorials.com/date-variable/
Redirect 301 /modulus http://www.spss-tutorials.com/modulus/
Redirect 301 /how-to-convert-a-unix-date-to-an-spss-date http://www.spss-tutorials.com/convert-unix-dates-into-spss-dates/
Redirect 301 /time-variable http://www.spss-tutorials.com/time-variable/
Redirect 301 /how-to-convert-dates-from-google-analytics http://www.spss-tutorials.com/convert-google-analytics-dates-into-spss-dates/
Redirect 301 /how-to-extract-a-year-from-a-date http://www.spss-tutorials.com/extract-a-year-from-a-date/
Redirect 301 /use-the-command-syntax-reference http://www.spss-tutorials.com/command-syntax-reference/
Redirect 301 /change-your-working-directory http://www.spss-tutorials.com/change-your-working-directory/
Redirect 301 /select-variables-having-pattern-in-names http://www.spss-tutorials.com/select-variables-having-pattern-in-names/
Redirect 301 /split-string-variable-into-components http://www.spss-tutorials.com/split-string-variable-into-components/
Redirect 301 /find-within-subjects-favorite-over-several-variables http://www.spss-tutorials.com/find-within-subjects-favorite-over-several-variables/
Redirect 301 /prefix-many-value-labels http://www.spss-tutorials.com/prefix-many-value-labels/
Redirect 301 /strip-prefix-from-value-labels http://www.spss-tutorials.com/strip-prefix-from-value-labels/
Redirect 301 /rename-or-prefix-many-files http://www.spss-tutorials.com/rename-or-prefix-many-files/
Redirect 301 /move-all-files-from-subfolders-to-main-folder http://www.spss-tutorials.com/move-all-files-from-subfolders-to-main-folder/
Redirect 301 /copy-all-files-from-subfolders-to-main-folder http://www.spss-tutorials.com/copy-all-files-from-subfolders-to-main-folder/
Redirect 301 /find-which-syntax-files-contain-some-expression http://www.spss-tutorials.com/find-which-syntax-files-contain-some-expression/
Redirect 301 /add-filenames-to-files-before-merging http://www.spss-tutorials.com/add-filenames-to-files-before-merging/
Redirect 301 /adjust-string-lengths-before-merging-files http://www.spss-tutorials.com/adjust-string-lengths-before-merging-files/
Redirect 301 /merge-many-data-files http://www.spss-tutorials.com/merge-many-data-files/
Redirect 301 /regression-over-many-dependent-variables http://www.spss-tutorials.com/regression-over-many-dependent-variables/
Redirect 301 /create-dummy-variables http://www.spss-tutorials.com/create-dummy-variables/
Redirect 301 /mean-center-many-variables http://www.spss-tutorials.com/mean-center-many-variables/
Redirect 301 /export-output-to-different-folders http://www.spss-tutorials.com/export-output-to-different-folders/
Redirect 301 /insert-values-from-output-tables-into-text http://www.spss-tutorials.com/insert-values-from-output-tables-into-text/
Redirect 301 /loop http://www.spss-tutorials.com/loop/
Redirect 301 /macro http://www.spss-tutorials.com/macro/
Redirect 301 /module http://www.spss-tutorials.com/module/
Redirect 301 /path http://www.spss-tutorials.com/path/
Redirect 301 /transformation-command http://www.spss-tutorials.com/transformation-command/
Redirect 301 /procedure http://www.spss-tutorials.com/procedure/
Redirect 301 /substring http://www.spss-tutorials.com/substring/
Redirect 301 /string http://www.spss-tutorials.com/string/
Redirect 301 /strip-prefix-from-variable-labels http://www.spss-tutorials.com/strip-prefix-from-variable-labels/
Redirect 301 /managing-variable-properties-1-introduction http://www.spss-tutorials.com/changing-variable-properties-1-introduction/
Redirect 301 /managing-variable-properties-2-names http://www.spss-tutorials.com/changing-variable-properties-2-names/
Redirect 301 /managing-variable-properties-3-type http://www.spss-tutorials.com/changing-variable-properties-3-type/
Redirect 301 /managing-variable-properties-4-width-and-decimals http://www.spss-tutorials.com/changing-variable-properties-4-width-and-decimals/
Redirect 301 /managing-variable-properties-5-variable-and-value-labels http://www.spss-tutorials.com/changing-variable-properties-5-variable-and-value-labels/
Redirect 301 /managing-variable-properties-6-missing-values-and-more http://www.spss-tutorials.com/changing-variable-properties-6-missing-values-and-more/
Redirect 301 /escape-sequence http://www.spss-tutorials.com/escape-sequence/
Redirect 301 /cautionary-note-on-sums http://www.spss-tutorials.com/spss-sum-cautionary-note/
Redirect 301 /cautionary-note-on-the-add-files-command http://www.spss-tutorials.com/spss-add-files-cautionary-note/
Redirect 301 /how-to-sort-values-within-cases http://www.spss-tutorials.com/sort-values-within-cases/
Redirect 301 /extension-command http://www.spss-tutorials.com/extension-command/
Redirect 301 /read-and-merge-multiple-sheet-excel-workbooks http://www.spss-tutorials.com/read-and-merge-multiple-sheet-excel-workbooks/
Redirect 301 /xlrd http://www.spss-tutorials.com/xlrd/
Redirect 301 /compare-dictionaries-over-files-before-merging http://www.spss-tutorials.com/compare-dictionaries-over-files-before-merging/
Redirect 301 /how-to-disaggregate-weighted-data http://www.spss-tutorials.com/disaggregate-data/
Redirect 301 /any http://www.spss-tutorials.com/any/
Redirect 301 /missing-values http://www.spss-tutorials.com/missing-values/
Redirect 301 /assumption-of-equal-intervals http://www.spss-tutorials.com/assumption-of-equal-intervals/
Redirect 301 /variable-type http://www.spss-tutorials.com/variable-type/
Redirect 301 /compute-a-is-b-is-c http://www.spss-tutorials.com/compute-a-is-b-is-c/
Redirect 301 /reverse-code-variables-with-value-labels http://www.spss-tutorials.com/reverse-code-variables-with-value-labels/
Redirect 301 /spss-recode-command-cautionary-note http://www.spss-tutorials.com/spss-recode-command-cautionary-note/
Redirect 301 /aggregate http://www.spss-tutorials.com/aggregate/
Redirect 301 /very-first-steps http://www.spss-tutorials.com/spss-very-first-steps/
Redirect 301 /names-and-labels-in-output http://www.spss-tutorials.com/names-and-labels-in-output/
Redirect 301 /hire-us http://www.spss-tutorials.com/hire-us/
Redirect 301 /home http://www.spss-tutorials.com/home/
Redirect 301 /introducing-python-1-what-and-why http://www.spss-tutorials.com/introducing-python-1-what-and-why/
Redirect 301 /introducing-python-5-five-essential-basics http://www.spss-tutorials.com/introducing-python-5-five-essential-basics/
Redirect 301 /introducing-python-6-four-tips http://www.spss-tutorials.com/introducing-python-6-four-tips/
Redirect 301 /introducing-python-3-how-to-use-it http://www.spss-tutorials.com/introducing-python-3-how-to-use-it/
Redirect 301 /the-six-greatest-benefits-of-using-spss-syntax http://www.spss-tutorials.com/the-six-greatest-benefits-of-using-spss-syntax/
#Ancient static html
Redirect 301 /getting-started.html http://www.spss-tutorials.com/python/
Redirect 301 /solutions.html http://www.spss-tutorials.com/python/
None of those redirects work for me without having a leading slash:
Redirect 301 /solutions http://www.spss-tutorials.com/python/
But it's not always a good idea to mix mod_rewrite and mod_alias directives (Redirect is part of mod_alias) because they both get applied to the same URI and you don't always want that happening. Try changing all the Redirects to:
RewriteCond %{HTTP_HOST} pythonforspss\.org$ [NC]
RewriteRule ^get-started$ http://www.spss-tutorials.com/python/ [L,R=301]
RewriteCond %{HTTP_HOST} pythonforspss\.org$ [NC]
RewriteRule ^solutions$ http://www.spss-tutorials.com/python/ [L,R=301]
RewriteCond %{HTTP_HOST} pythonforspss\.org$ [NC]
RewriteRule ^spss-tips$ http://www.spss-tutorials.com/basics/ [L,R=301]
RewriteCond %{HTTP_HOST} pythonforspss\.org$ [NC]
RewriteRule ^glossary$ http://www.spss-tutorials.com/glossary/ [L,R=301]
RewriteCond %{HTTP_HOST} pythonforspss\.org$ [NC]
RewriteCond %{THE_REQUEST} \ /.*index\.php
RewriteRule ^index\.php$ http://www.spss-tutorials.com/python/ [L,R=301]

How to redirect default permalink with htaccess on wordpress?

How to redirect default permalink to new domain with /%postname%/ permalink by .htaccess? I already try all case with Redirect and RedirectMatch but didn't work.
Redirect 301 /?p=123 http://newdomain.com/new-post
Redirect 301 http://olddomain.com/?p=123 http://newdomain.com/new-post
RedirectMatch 301 /?p=123 http://newdomain.com/new-post
RedirectMatch 301 http://olddomain.com/?p=123 http://newdomain.com/new-post
Try
RewriteRule ^(.*)$ http://newsite.com/$1 [R=301,L]

Resources