Skip to main content

All Questions

1 vote
1 answer
25 views

My htaccess redirects with regex aren't working

I have the following redirect in my htaccess: Redirect 301 "^/city/(.*)-north-carolina$" "https://example.com/US/NC/$1-north-carolina-hotels.php" When I enter example.com/city/...
AngryMob's user avatar
1 vote
1 answer
56 views

Removing a character from a redirect URL in htaccess

When I re-did my web site years ago, some old straggler pages were left in the old format. So I wrote redirects in the htaccess to send them to new the pages. Problem is the old url's added a ...
BANONE's user avatar
  • 53
0 votes
1 answer
267 views

301 RewriteRule works perfect in OpenLiteSpeed, but only 95% of the time

This Wordpress installation previously had a permalink structure of year/mo/day/post-name but was later changed to use the post name only. This 301 RewriteRule was added to the top of htaccess, and it ...
Aidan Knight's user avatar
0 votes
3 answers
599 views

301 Redirect Regex Pattern

I'm trying to make a IIS redirect rule to redirect from this url pattern, but it beats me: https://www.mycompanyPLC.com/en/lorem/ipsum/whatever to https://www.mycompanyLTD.com/lorem/ipsum/whatever ...
iusmar's user avatar
  • 359
1 vote
1 answer
42 views

301 Redirect from /%anyfolder%/ to /Specific folder/ - Apache

I have a website that has a bunch of old domain paths. For example. https://example.com/path1/file.html https://example.com/path2/file.html https://example.com/path3/file.html https://example.com/...
level42's user avatar
  • 967
0 votes
1 answer
137 views

301 Redirect www.domain to domain.com

I received a request to redirect a TLD that I believe to be impossible: www.domain ==> domain.com In this situation, the company owns and controls the TLD. So, for example say I'm trying to ...
Franchise's user avatar
  • 1,171
0 votes
1 answer
67 views

301 Redirect domain without www works, but with www does not

Currently I'm working on a request to both redirect the domain A to domain B and redirect a specific page within the domain A to domain B. Here's the expectation in pseudocode: foo.com =====> ...
Franchise's user avatar
  • 1,171
1 vote
1 answer
32 views

301 redirect to domain with # in the URL

I'm currently attempting to redirect the below: bar.com/foo ====> bar.com/bar.html#/# My redirect rule is as follows: RewriteEngine On RewriteRule ^/foo$ bar.com/bar.html#/# [R=301,L,NC] Here'...
Franchise's user avatar
  • 1,171
0 votes
0 answers
449 views

301 redirect to new domain without changing URL?

I'm currently working on an Apache 301 redirect from one domain to another: https://www.foo.com -----> https://www.bar.com A question I have is: does a solution exist where I can redirect the ...
Franchise's user avatar
  • 1,171
1 vote
1 answer
94 views

301 Redirect TLD with country domain to another domain

I'm trying to redirect a TLD to a different domain entirely and am beginning to pull my hair out trying to get to the bottom of it: Here's an example origin domain: www.foo.com.au and the intended ...
Franchise's user avatar
  • 1,171
1 vote
2 answers
3k views

301 redirect with query parameters and ~ in URL

I have a redirect problem where I would like to redirect a url with query parameters to another PDF entirely, e.g.: Original URL: https://www.foo.bar.com/~/bar.pdf?la Redirect URL: https://www.bar....
Franchise's user avatar
  • 1,171
0 votes
1 answer
1k views

WordPress PHP Redirect with Regex Wildcard

This is for a project. I need to redirect certain incoming URL requests to files hosted on the same webserver. I cannot use .htaccess and I cannot rely on any plugins. I managed to do this with a ...
Daniel Slyman's user avatar
1 vote
1 answer
704 views

What's the RewriteRule to redirect all pages in a folder to a single URL (the Homepage)?

Hi I want to 301 redirect all urls, including the folder name, within the portfolio folder to the homepage. There are plenty of similar questions/answers, but the ones I could find focused on simply ...
Metzed's user avatar
  • 480
1 vote
1 answer
35 views

Redirection through Regular expression oscthumb.php query string unable

I am unable to solve this one. I need to redirect this kind of urls: http://www.example.com/oscthumb.php?src=/images/image.jpg or http://www.example.com/oscthumb.php?src=/images/image.jpg&w=...
andrewbaltimore's user avatar
-1 votes
1 answer
28 views

Apache redirect only part of a query

I'm trying to redirect a query string to a non query url. It looks something like this. Original http://searchtest.help.org/search?client=Cool_Sub&site=Cool_Sub&proxystylesheet=Cool_Sub&q=...
Joseph Simon's user avatar

15 30 50 per page
1
2 3 4 5 6