Moved images to another folder - need help with htaccess rewrite rule for png

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
3
down vote

favorite












I had to move my image folder.
Before it was example.com/shoplogo/(name*).png now its example.com/shop-logo/(name*).png just stuck with the rewrite rule :-(.










share|improve this question









New contributor




joloshop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    up vote
    3
    down vote

    favorite












    I had to move my image folder.
    Before it was example.com/shoplogo/(name*).png now its example.com/shop-logo/(name*).png just stuck with the rewrite rule :-(.










    share|improve this question









    New contributor




    joloshop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I had to move my image folder.
      Before it was example.com/shoplogo/(name*).png now its example.com/shop-logo/(name*).png just stuck with the rewrite rule :-(.










      share|improve this question









      New contributor




      joloshop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I had to move my image folder.
      Before it was example.com/shoplogo/(name*).png now its example.com/shop-logo/(name*).png just stuck with the rewrite rule :-(.







      htaccess mod-rewrite png






      share|improve this question









      New contributor




      joloshop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      joloshop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 1 hour ago









      MrWhite

      29.6k33363




      29.6k33363






      New contributor




      joloshop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 hour ago









      joloshop

      182




      182




      New contributor




      joloshop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      joloshop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      joloshop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          Presumably the visible links to your images remain the same and point to the old location: shoplogo and you need to internally rewrite the request to the correct location (ie. shop-logo) so that they still work.



          Then you can do something like the following using mod_rewrite at the top of your .htaccess file in the root of your site:



          RewriteEngine On
          RewriteRule ^shoplogo/([^/]+.png)$ /shop-logo/$1 [L]


          $1 is a backreference to the captured filename.






          share|improve this answer






















          • thanks that worked, almost had it but stupid me... THANKS
            – joloshop
            1 hour ago










          • You're welcome - glad it worked. In the future, if you include the code you have tried in your question then we can maybe just correct and explain why the original code didn't work. As with many things (in .htaccess), there are many ways to write essentially the same thing.
            – MrWhite
            1 hour ago










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "45"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          joloshop is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwebmasters.stackexchange.com%2fquestions%2f118566%2fmoved-images-to-another-folder-need-help-with-htaccess-rewrite-rule-for-png%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          Presumably the visible links to your images remain the same and point to the old location: shoplogo and you need to internally rewrite the request to the correct location (ie. shop-logo) so that they still work.



          Then you can do something like the following using mod_rewrite at the top of your .htaccess file in the root of your site:



          RewriteEngine On
          RewriteRule ^shoplogo/([^/]+.png)$ /shop-logo/$1 [L]


          $1 is a backreference to the captured filename.






          share|improve this answer






















          • thanks that worked, almost had it but stupid me... THANKS
            – joloshop
            1 hour ago










          • You're welcome - glad it worked. In the future, if you include the code you have tried in your question then we can maybe just correct and explain why the original code didn't work. As with many things (in .htaccess), there are many ways to write essentially the same thing.
            – MrWhite
            1 hour ago














          up vote
          2
          down vote



          accepted










          Presumably the visible links to your images remain the same and point to the old location: shoplogo and you need to internally rewrite the request to the correct location (ie. shop-logo) so that they still work.



          Then you can do something like the following using mod_rewrite at the top of your .htaccess file in the root of your site:



          RewriteEngine On
          RewriteRule ^shoplogo/([^/]+.png)$ /shop-logo/$1 [L]


          $1 is a backreference to the captured filename.






          share|improve this answer






















          • thanks that worked, almost had it but stupid me... THANKS
            – joloshop
            1 hour ago










          • You're welcome - glad it worked. In the future, if you include the code you have tried in your question then we can maybe just correct and explain why the original code didn't work. As with many things (in .htaccess), there are many ways to write essentially the same thing.
            – MrWhite
            1 hour ago












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          Presumably the visible links to your images remain the same and point to the old location: shoplogo and you need to internally rewrite the request to the correct location (ie. shop-logo) so that they still work.



          Then you can do something like the following using mod_rewrite at the top of your .htaccess file in the root of your site:



          RewriteEngine On
          RewriteRule ^shoplogo/([^/]+.png)$ /shop-logo/$1 [L]


          $1 is a backreference to the captured filename.






          share|improve this answer














          Presumably the visible links to your images remain the same and point to the old location: shoplogo and you need to internally rewrite the request to the correct location (ie. shop-logo) so that they still work.



          Then you can do something like the following using mod_rewrite at the top of your .htaccess file in the root of your site:



          RewriteEngine On
          RewriteRule ^shoplogo/([^/]+.png)$ /shop-logo/$1 [L]


          $1 is a backreference to the captured filename.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 1 hour ago

























          answered 1 hour ago









          MrWhite

          29.6k33363




          29.6k33363











          • thanks that worked, almost had it but stupid me... THANKS
            – joloshop
            1 hour ago










          • You're welcome - glad it worked. In the future, if you include the code you have tried in your question then we can maybe just correct and explain why the original code didn't work. As with many things (in .htaccess), there are many ways to write essentially the same thing.
            – MrWhite
            1 hour ago
















          • thanks that worked, almost had it but stupid me... THANKS
            – joloshop
            1 hour ago










          • You're welcome - glad it worked. In the future, if you include the code you have tried in your question then we can maybe just correct and explain why the original code didn't work. As with many things (in .htaccess), there are many ways to write essentially the same thing.
            – MrWhite
            1 hour ago















          thanks that worked, almost had it but stupid me... THANKS
          – joloshop
          1 hour ago




          thanks that worked, almost had it but stupid me... THANKS
          – joloshop
          1 hour ago












          You're welcome - glad it worked. In the future, if you include the code you have tried in your question then we can maybe just correct and explain why the original code didn't work. As with many things (in .htaccess), there are many ways to write essentially the same thing.
          – MrWhite
          1 hour ago




          You're welcome - glad it worked. In the future, if you include the code you have tried in your question then we can maybe just correct and explain why the original code didn't work. As with many things (in .htaccess), there are many ways to write essentially the same thing.
          – MrWhite
          1 hour ago










          joloshop is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          joloshop is a new contributor. Be nice, and check out our Code of Conduct.












          joloshop is a new contributor. Be nice, and check out our Code of Conduct.











          joloshop is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwebmasters.stackexchange.com%2fquestions%2f118566%2fmoved-images-to-another-folder-need-help-with-htaccess-rewrite-rule-for-png%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          Installing NextGIS Connect into QGIS 3?

          One-line joke