Trouble 301 redirecting pages from old Wix site to new site - .htaccess

My client's original site was built on Wix, and I have designed and built a new one on a new server.
I'm trying to 301 redirect some pages from the old site to their counterparts on the new one, and it doesn't seem to want to work properly, as each old URL simply goes straight to the home page.
Example case:
old URL: example.com/#!clients/c1pen
new URL: example.com/stay-with-us
I have the redirect set out like so in .htaccess:
Redirect 301 /#!clients/c1pen /stay-with-us
Can anyone shed some light on this for me?

Hash-location (http://someurl/#hash-location) typically adresses an anchor in a html page and is not visible to the server rewrite rules. Consequently the matcher #!clients/c1pen does never match. See 'hash' url rewrite in .htaccess

Related

TYPO3 10 .htaccess redirect old links to new links not working

While updating a website (completely new page tree, IDs have changed), the old links need to redirect to the new links. Domain stays the same.
This is the first thing I write in my .htaccess
RewriteEngine on
Redirect 301 /index.php?id=5 /contact
Redirect 301 /test.html /xy.html
Redirect 301 /index.php?id=6 /imprint
# and many more
test.html successfully links to xy.html (just a test, they don't even exist and correctly show the 404 page)
the index.php?id=x redirects however do not work. They actually still open whatever new page has this ID.
I don't understand why it's not working. Is TYPO3 interfering? I though I would be safe if I write it as the first thing in my .htaccess.
TYPO3 does not interfere as the rules in the .htaccess file are evaluated before.
Another option could be to use the redirect module of TYPO3 for creating the redirects. Those can then be created in the backend and maintained by editors. A small drawback is that performance is not that perfect as in .htaccess but it is much more convenient.

.httaccess 301 redirect subdomain with path wildcards

I need to 301 redirect URL's I was using on my old website/platform to my new website on Shopify.
Old url structure:
https://shop.olddomain.com/path/name-of-page
What I would like to have is a wildcard for http/https, because the platform changed my website from insecure to secure back when Google started ranking based on that.
I would also need a wildcard for /path/name-of-page, because I have hundreds of URL's with that structure and I'm not trying to map each of those URL's to the new URL's. Basically, my goal is to make sure those old URL's don't go to a dead end 404, and are redirected to the new website homepage.
So http/https://shop.olddomain.com/* should redirect to https://newdomain.com
In your .htaccess for shop.olddomain.com place
Redirect 301 /shopoldpath https://newdomain.com

Need help redirecting one website URL to another with apache2 and .htaccess

I have two domains - https://hosting.opensimcity.org, and http://paradigm.pocketmud.com and I want to redirect the latter to the former. That is, when someone connects to http://paradigm.pocketmud.com I want it to redirect to https://hosting.opensimcity.org/paradigm
Any tips on doing this in my .htaccess file?
Just try the following htaccess redirect code:
Redirect 301 / https://hosting.opensimcity.org/paradigm
This 301 redirect response notifies the search engines that the page has moved permanently from the old URL to the new URL. The search engines also transfer the old URL page rank to the new URL.

htaccess redirect specific pages to another domain

I’m having some real problems with 301 redirects in my .htaccess file.
I have about 20 pages on an old site that I need to redirect to pages on a new site. The URL structure of the new site is totally different.
Here’s one that I tried:
Redirect 301 /dan-carr-gear-list/travel-gear https://dancarrphotography.com/gear/travel/
Unfortunately, this doesn’t work.
What happens is that you get redirected to https://dancarrphotography.com/gear/travel-gear/ for some reason.
I just can’t figure it out.

how to use old URls as it is in new drupal site

I am migrating an asp site to drupal.the existing site node URL is as
story.asp?sectioncode=1&storycode=49667&c=1
to use the same urls in drupal site i add the URL in URL aliases.when i click on any article it it showing as
story.asp%3Fsectioncode%3D1%26storycode%3D49667%26c%3D1
in the browser.how to remove %3D,%26,%3F from the URL and when i copy and paste the old url in the browser it is not redirecting me to the actual page giving 404 not found page.could some one please help me how to manage my old URLs as it is in new site.
You're not supposed to type something like story.asp?sectioncode=1&storycode=49667&c=1 as an URL alias.
There's a better way to do that. Try installing redirect module and add a new 301 redirect rule from story.asp?sectioncode=1&storycode=49667&c=1 to your new node's URL node/1.
So, whatever any user / search engine visits story.asp?sectioncode=1&storycode=49667&c=1, they will be redirected to node/1. or whatever the path you have given to the 301 redirect rule.
Hope this Helps... Muhammad.

Resources