All Questions

Tagged with
Filter by
Sorted by
Tagged with
-2 votes
2 answers
32 views

301 redirect the old domain with a certain link to a new domain with the same link

I have a problem, I want to redirect htaccess The content of domainold.com is still used, only this URL has changed from the Old website, namely http://domainold.com/product/register to my new site, ...
Project Downgrade's user avatar
0 votes
1 answer
43 views

How to block all requests starting with "?mode" on Apache?

Recently my website was hacked and now I have around 20000 indexed links in Google that were redirected to other sites via my website. Now I have stopped all redirects but I have too many request on ...
Ahmad Eidizadeh's user avatar
1 vote
0 answers
76 views

htaccess: I can't redirect to nested subfolders correctly on the WordPress app

I have a multilingual WordPress site that has two languages: en and tr, It's site A. I wanna put my other WordPress site inside /tr/shop/ folder, It's site B. Just need only these rules: /en/anything/...
user avatar
1 vote
1 answer
191 views

Apache RedirectMatch not matching double slash

I want to redirect URLs with multiple consecutive slashes (e.g. //) in the path to have only one consecutive slash, e.g. https://example.com/a//b/c/ → https://example.com/a/b/c/. My .htaccess file ...
fionn's user avatar
  • 13
1 vote
0 answers
81 views

How to redirect all pages that contain an specific word using the .htaccess file

I have a bunch of indexed pages that start with the same word and they are all 404 so I want to redirect them all to the homepage of the site. The server is Apache, so I would like to use the ....
Pol Senserrich's user avatar
1 vote
1 answer
454 views

Default WordPress .htaccess rewrites causes default server page to load due to no default index page present for the root URL

I could really do with some help here please. I know this is a WordPress issue now through testing. If I allow .htaccess to process rewrites on my Wordpress sites by adding AllowOverride FileInfo to ...
J O's user avatar
  • 21
1 vote
1 answer
346 views

Trapping misformatted paths to Redirect to 404 instead of returning 403

Owing to an error long ago our company web site has been serving image URLs containing a significant amount of white space. E.g. http://www.example.com/ /assets/ProductPhotos/...
AristotleO's user avatar
0 votes
1 answer
93 views

Redirect rules for multiple enviroments

I have written a set of rules for 3 different environments on the same server. In a nutshell I would redirect the users to the Dev, Stage and Prod single sites. Also enforce https and www for the ...
Manoxs's user avatar
  • 1
0 votes
1 answer
771 views

How to redirect all pages that contain a specific word using the .htaccess file

I have a bunch of indexed pages that start with the same word and they are all 404 so I want to redirect them all to the homepage of the site. The server is Apache, so I would like to use the ....
Petar Cvetic's user avatar
2 votes
2 answers
3k views

.htaccess - Redirect all URLs with one exception

I want to redirect all URLs from one domain to another. Some of the old URLs have new counterparts with specific pages to redirect to. All other URLs should redirect to the homepage of the new domain. ...
Cray's user avatar
  • 135
1 vote
1 answer
658 views

htaccess: 301 redirect defined URLs to new domain and catch all redirect the rest

I want to redirect some URLs from an old domain to new versions on a new domain. The old domain uses the www. subdomain and SSL. For example: olddomain.com/audi -> newdomain.com/cars/audi ...
Cray's user avatar
  • 135
1 vote
1 answer
160 views

How Can We Do 301 Redirect Of Over 200 Pages To Corresponding 200 Pages At New Location?

I need help and need it fast. We recently migrated a subdomain to integrate with the domain. Eg. https://blog.example.com to https://www.example.com/blog https://blog.example.com has a ton of traffic ...
user18571's user avatar
2 votes
1 answer
2k views

Redirect part of a URL parameter to the URL-Path

I used a module that created links like this: https://example.com/login?create_account=1&back=https://example.com/product/2164/?ets_rv_add_review=1 I need to redirect them to: https://example.com/...
Ehsanai's user avatar
  • 21
1 vote
0 answers
115 views

when it goes to https:/... directly it is missing the referer part

it's all about cookies ,it suppose redirect to ?referer_id=186 every time which is refresh the cookies of new logo but i notices when user delete or clear the history of Brower and try to visit the ...
Momen Rashad's user avatar
0 votes
1 answer
5k views

How to setup correct .htaccess for laravel app on subdomain?

I moved my Laravel application from the development localhost to an internet production subdomain. On localhost everything works. But when I move app to subdomain it seems .htaccess can not handle ...
Sahasrar's user avatar
1 vote
1 answer
933 views

Using an htaccess file for 410 (gone page) prevents use of images

I am shutting down a website. I have deleted the wordpress site and the only page left in the domain is a page announcing the permanent shutdown of the site. The URL of the shutdown page is... http://...
Photokonnexion's user avatar
1 vote
1 answer
523 views

Redirect to folder only if root from other site referrer

I have a redirect from root to subfolder. If user visits https://example.com it redirects to https://example.com/subfolder. But I want it not to redirect if referrer is my site, so user can reach root ...
Stas Ponomaryov's user avatar
0 votes
1 answer
710 views

Redirect all pages to non www and one page to www

I want to redirect all my internal pages (eg: example.com/about) to their non-www version but I want my homepage (https://example.com) to redirect to its www version (https://www.example.com). I ...
Excellent Exim House's user avatar
0 votes
0 answers
29 views

masking URL after redirection [duplicate]

I re-post my question in the event that I will be more clear as to what I would like to do. I have a subdomain under a dns name, lets say it is mysub.domain . This subdomain is in a remote provider ...
thermike's user avatar
0 votes
0 answers
23 views

masking after redrection using .htaccess [duplicate]

I have read many examples that use the .htaccess file method to mask a url. None of them works for me. It might be something simple that I am missing. Please bare with me. Here is what i want to do: I ...
thermike's user avatar
1 vote
1 answer
2k views

rewrite rules from apache to nginx

I have a problem with this... I'm using free hosting for giving a demo to my future buyers of my own cms. The hosting is hubuhost.com, they are supporting the last version of php 8.1. The problem is ...
pok4's user avatar
  • 13
1 vote
1 answer
814 views

Two different rewrite conditions in the same .htaccess?

I need to create a rewrite condition for two specific files, according to the requested path in the URL. It's possible? Condition 1: If the URL is example.com/admin go to admin.php?uri=params. That is:...
João Williams Balaniúc's user avatar
1 vote
1 answer
429 views

How to remove ".com" suffix from hostname variable using .htaccess

I'm attempting to create a unique series of redirects on an Apache web server (Server version: Apache/2.2.15). Using .htaccess or additional Apache modules, I need to fully parse requested URLs in ...
sparecycle's user avatar
1 vote
1 answer
2k views

Rewrite Rule for URL with query does not work

I write the following rewrite rule: <IfModule mod_rewrite.c> RewriteCond %{QUERY_STRING} rp=\/knowledgebase\/.* RewriteRule ^\/customer\/index.php /knowledgebase/ [R=301,L] RewriteRule ^\/...
alancc's user avatar
  • 163
2 votes
1 answer
764 views

used colons for url htaccess http://localhost/1:1

I have a problem with the colons used in url this my url http://localhost/1:1 this my htaccess RewriteEngine On RewriteRule ^/(.*):(.*) index.php/$1:$2 this error show Forbidden You don't have ...
amir shariflou's user avatar
1 vote
1 answer
7k views

How do you redirect URLs with a query string with htaccess?

I want to redirect pages like : example.com/fr/opportunites/?sector_cat=bourses-detudes&ajax_filter=true To example.com/fr/bourses-detudes/ the second page is a post type page created with ...
LH AL's user avatar
  • 11
0 votes
0 answers
81 views

Regex on htaccess file gives INTERNAL REDIRECT error

I'm trying to create a redirect rule that matches the following urls: en/property/rotterdam/apartment/lorem-ipsum-dolor-sit-amet/v-9/ en/property/rotterdam/apartment/lorem-ipsum-dolor-sit-amet/9/ en/...
Lucas's user avatar
  • 101
2 votes
1 answer
767 views

How to get line number of error that .htaccess apache2 is reporting in /var/logs/error.log

I get a internal server error after adding redirects to .htaccess - I've added 600 of them. I check /var/logs/error.log [Wed May 12 16:26:02.600394 2021] [core:alert] [pid 8071] [client 127.127.127....
therobyouknow's user avatar
0 votes
1 answer
611 views

Apache 410 a URL Without Affecting Sub Paths

I'm trying to kill a URL, so in my .htaccess file, I put: Redirect 410 /my-path It works. If I try to visit: https://www.example.com/my-path I get: Gone The requested resource is no longer ...
GTS Joe's user avatar
  • 199
2 votes
1 answer
1k views

How do I exclude my sitemap from httacess redirect?

I want all urls to be redirected, except my sitemap xml file in the root directory. The htaccess should allow https://old-domain/xml.xml to resolve with HTTP 200, but it is still redirecting to the ...
Till Noah's user avatar
1 vote
1 answer
119 views

Redirect the document root and a specific page only to another domain

Might sound confusing, but what I want to achieve is this: If the user visits: www.mydomain.com (with or without www.) transfer them to: www.myotherdomain.com/welcome-old-users At the same time, I ...
Paloma Martinez's user avatar
0 votes
0 answers
152 views

multiple htaccess redirects to a new domain

I'm trying to redirect an entire domain over to another domain while also redirecting a couple of specific pages to specific locations. I also want to preserve www and https on the original domain to ...
Kyle's user avatar
  • 1
0 votes
1 answer
146 views

Apache Redirect with OR Operator

How can I use the Apache OR operator to redirect several paths to one URL? E.g.: RewriteEngine on RedirectMatch 301 /foo || /foo/bar || /das.html https://example.com/ext/ddy/$1 Thanks for any help.
GTS Joe's user avatar
  • 199
1 vote
1 answer
458 views

.htaccess Redirect 301 - Single pages work fine, homepage doesn't

I'm trying to redirect some specific pages to the new ones on my new site (these redirects work fine) and, finally, my homepage OR (even better) my homepage and all the pages which I didn't redirect ...
Daniele Carollo's user avatar
0 votes
0 answers
321 views

Redirect to magento 2 store in htaccess

I'm using SetEnvIf Host to redirect users to the correct magento store depending on the domain name. This works perfect for https://www.domain.co.uk, http://domain.co.uk and http://www.domain.co.uk. ...
Jonas de Herdt's user avatar
1 vote
1 answer
127 views

.htaccess redirect root to i18n content

I'm facing problem with .htaccess and have not idea how to solve it. Our webpage is exposed on two domains: example.de and example.com. I would like to redirect user to i18n content when user request ...
Patryk Rogosch's user avatar
2 votes
1 answer
108 views

.htaccess redirect/rewrite many domains to many domains

My idea is: requests to service.example.com should be redirected to service.example.com, all the other requests to example.com should be redirected to base.example.com My host is configured in such ...
Tomek's user avatar
  • 21
0 votes
1 answer
775 views

403 redirect not working .htaccess

I want to block users from India from the website and redirect them to a custom 403 page. Here's the code that i placed in .htaccess file: ErrorDocument 403 /403.html deny from 1.6.0.0/15 deny from 1....
Angira Kartik's user avatar
1 vote
1 answer
279 views

Does an .htaccess redirect to a different folder activate the second .htaccess within?

On my apache site, I have the following redirect: RewriteCond %{REQUEST_URI} !^/web/ RewriteRule ^(.*)$ /web/$1 which redirects from the root directory, to the "Web" directory. Will this ...
Eliezer Berlin's user avatar
1 vote
1 answer
9k views

htaccess redirect all urls with question mark parameter to without

I checked a lot, for my question. there are some close, but none that would solve my problem. I need to permanently redirect ALL URLs that end in this: ?mode=list AND ?mode=grid to without (remove ...
vyperlook's user avatar
2 votes
1 answer
1k views

HSTS and Wordpress redirection to www and non-www and https - avoid multiple redirections?

I am trying to implement the HSTS (HTTP Strict Transport Security) on my Wordpress site, but I am not getting any success. First I had managed to redirect my site from non-www to www , and including ...
mlclm's user avatar
  • 169
8 votes
1 answer
9k views

.htaccess Redirect 301 with trailing slash adds trailing slash to destination

Just had my website re-done and am trying to set up redirects in the .htaccess file for links that have changed This works fine, except it doesn't work for /example/ (with trailing slash on source ...
Chris Dutrow's user avatar
2 votes
0 answers
3k views

ErrorDocument 400 redirect to different URL without rewrite

I want to implement a custom Error 400 page on my website tikolu.net, to a file called 400.php in a folder called error. The first thing I tried was to simply place ErrorDocument 400 /error/400.php ...
Tikolu's user avatar
  • 121
1 vote
1 answer
250 views

How do I 301 redirect some specific URLs - including the root - to specific locations, and then everything else to the new root?

I'm struggling with a .htaccess mod_rewrite challenge. Help is appreciated. I want the following 301 redirects to work: mysite.com > https://newsite.com/subdirectory/ mysite.com/old_page_1/ > ...
PhilSmully's user avatar
1 vote
1 answer
2k views

Redirect different language urls to their english counterpart in htaccess

I'm trying to redirect language URLs that end with /?lang=da, /?lang=de and /?lang=nl to the same URL but ending in /?lang=en. So www.example.com/accommodation/hotel-room-1/?lang=da should result in ...
Kneops's user avatar
  • 13
0 votes
1 answer
257 views

Two sites on the same server with unwanted redirection

I have two different sites domain1.com domain2.com Problem : I only can access domain2.com by using www.domain2.com If i try domain2.com it redirects to domain1.com. Configuration files: domain1....
Ianagos's user avatar
  • 11
1 vote
1 answer
5k views

How to set the http_referrer in a htaccess redirect?

I have a new domain for my site and want to forward the user to this new site. So I set up a simple redirect in my .htaccess file likeI have a new domain for my site and want to forward the user to ...
rockZ's user avatar
  • 115
0 votes
1 answer
812 views

How resolve redirects issues [closed]

I am facing big issue after using cloudflare. I am not adeveloper .I am a simple person. How I can resolve this issue through htaccess file ?😕 My current htaccess file is here # BEGIN LSCACHE ## ...
Epeople's user avatar
2 votes
1 answer
2k views

Redirect link with query string, but only from specific page

My problem is about that I want to redirect links that contains specific phrase and specific query string after question mark. For example - redirect from: http://example.com/first-category?p=1 to: ...
oska's user avatar
  • 33
1 vote
1 answer
1k views

How to redirect URLs that contain uppercase letters to another site

Is there any .htaccess rule to redirect a URL that has uppercase letters to another URL / site? for example : /Abcgdr or, /aaaAbcgfr redirect to example.com
Arya99's user avatar
  • 13

1
2 3 4 5
7