Moved images to another folder - need help with htaccess rewrite rule for png
Clash 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 :-(.
htaccess mod-rewrite png
New contributor
add a comment |Â
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 :-(.
htaccess mod-rewrite png
New contributor
add a comment |Â
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 :-(.
htaccess mod-rewrite png
New contributor
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
htaccess mod-rewrite png
New contributor
New contributor
edited 1 hour ago
MrWhite
29.6k33363
29.6k33363
New contributor
asked 1 hour ago
joloshop
182
182
New contributor
New contributor
add a comment |Â
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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.
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
add a comment |Â
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
add a comment |Â
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.
joloshop is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password