2
votes
1answer
22 views

How to make htaccess not redirect to http on form submission

Part of my .htaccess file forces https on certain pages (e.g. when user logs in, enters credit card information, etc.) while forcing http on all other pages. This seems to be the ideal setup for what ...
0
votes
1answer
30 views

redirect string to different url in nginx

I want to redirect a string to different URL in nginx. This what my vhost looks like and is working fine. server { listen 80; server_name secure.example.com; root /opt/tomcat/webapps/test/; ...
0
votes
1answer
30 views

How can I rewrite from /page to /xx/page, using htaccess & apache only?

Hi I have found many resources on mod-rewrite and Apache but I haven't been successful of making a working example. The example below works for ✓ WORKS example.com/en/page1.php ☞ ...
-2
votes
0answers
14 views

How to redirect to file inside folder (backward compatibility) [duplicate]

I have reordered the files of my website, and i want to give backward compatibility to this kind of links: www.example.com/Tweet1.html -redirects to- www.example.com/tweets/Tweet1.html ...
0
votes
0answers
18 views

Redirect url get variables after rewriting htaccess

My original url was this: wwww.domain.com/car-details.php?merk=BMW&model=X5&titel=sale&car_id=3 I have Rewrite it into this: wwww.domain.com/BMW/X5/sale/3 By putting this in my ...
1
vote
0answers
79 views

Apache SSL redirect loop

We are trying to redirect our site from http to https only. Everything we have tried in .htaccess has resulted in a redirect loop. If we manually type the "https://" in front of the url, our page ...
0
votes
1answer
55 views

Redirect Port 80 request to 443 for site

I managed to redirect my requests from port 80 to 443 using the redirect permanent. However, there is a problem. On my page there is a link to /forum/. When one clicks the link it tries to go to ...
0
votes
0answers
8 views

301 redirect link showing ?q=referral_page last in URL [duplicate]

Hi I am redirecting my page using Redirect permanent /music.html http://www.example.com/blog/wedding-tools/wedding-music But problem is after redirect all URL showing ?q=referral_page in last ...
0
votes
1answer
51 views

htaccess redirect HTTP & HTTPS non-www to HTTPS www

How can I redirect my website from all HTTP requests to HTTPS + non-www HTTPS to HTTPS with www.? Example: Redirect HTTP non-www, HTTP www. & HTTPS non-www: HTTP:// example.com/ && ...
1
vote
2answers
107 views

.htaccess redirect visitor if he has a cookie is from accounts.google.com [closed]

I am creating a gateway page that redirects visitors based on what services they are using. How should a .htaccess rule that redirects a visitor if he has a cookie originating from the domain ...
0
votes
0answers
87 views

Redirect only /index.php page and allow access to all sub directories

I'm running ExpressionEngine (www.mywebsite.com) as the root of my website and Magento in a sub directory (www.mywebsite.com/store) I'm trying to redirect the Magento homepage (and only the homepage) ...
0
votes
1answer
37 views

htaccess redirectmatch all of 1 type of file in all subdirectories under a certain level

I need to redirect jpgs (that don't exist any more) that scummy picture crawler sites are still trying to access from the picture directory on our old site. RedirectMatch 301 (?i)/Portals/5/.jpg$ ...
0
votes
1answer
29 views

Use htaccess to alias to different hosting

I have a host my.site.com that doesn't support a PHP version that I need, so I got some new hosting at newsite.com that has a more up to date PHP version. I'm going host the site completely on ...
0
votes
1answer
81 views

.htaccess HTTPS for all except specific files

I have a problem with a redirect in my .htaccess-File. Basically I want to send all requests to the HTTPS, which works perectly: RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ ...
-1
votes
1answer
25 views

Redirecting url with .htaccess [duplicate]

I'm trying to redirect http://example.com/forum/index.php to http://example.com/forum/ and it will not work. Here's the code I'm using in my .htaccess. What am I doing wrong? Redirect forum/index.php ...
0
votes
1answer
55 views

Redirect specific IP using htaccess [duplicate]

I am trying to figure out if it is possible to do a 301 redirect for a particular IP address (in this case brute force password bot). I want to send this guy to a project honeypot link rather than ...
-1
votes
1answer
38 views

How do I redirect al url request using htaccess when I already have rewrite rules?

I've tried everything but simply can't get this to work. This is the default Wordpress redirect code that sits in my htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ...
0
votes
3answers
126 views

How do I redirect my website from non-www to WWW using Apache2? [closed]

I'm currently trying to set up my personal webpage. I am using a VPS and have manually installed Wordpress, and everything seems to work... except if I go to the non-www version of my website, it ...
0
votes
1answer
32 views

htaccess parameter to subdomain

I would like to redirect this http://www.domain.com/test.php?sub=subdomain&type=cars redirects to http://subdomain.domain.com/cars I already have mod_rewrite rules to do the opposite: ...
0
votes
1answer
54 views

htaccess redirect querystring value

I need to redirect www.URL.it/directory_one/index.php?param_one=XXX&param_two=**YYY** to www.URL.it/newpage.php?param_three=**YYY** I tried all I found online but the only things that works ...
0
votes
1answer
90 views

redirect a directory to a new domain without touching the main website

I would like to redirect https://mineyourmind.de/forum to https://mineyourmind.net/forum . Every rewrite rule I could google didn´t work, they also redirected the main domain (mineyourmind.de). Im ...
0
votes
1answer
125 views

Redirecting www.subdomain.domain.com to domain.com with htaccess

So I'm trying to get my server configured in a specific way so that anyone who visits http://www.subdomain.domain.com or https://www.subdomain.domain.com gets redirected to https:// without the www. ...
0
votes
0answers
141 views

WP in subdirectory : redirect loop error due to htaccess?

I have a fresh Wordpress install in a subdirectory: /blog/ I visit my Wordpress site like this: http://www.example.com/blog and posts like this: http://www.example.com/blog/category/postname In ...
0
votes
0answers
45 views

unidentified redirect based on the referer

My client has a problem with a redirect. When there's an external link pointing to his website, this link gets redirected by the server back to the referer. $ curl -i -H "Referer: ...
0
votes
1answer
104 views

.htaccess URL rewrite to upper-case characters in domain

For example, I'd like to have foobar.com show FooBar.com This almost works, but ends up forcing a redirect loop: RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?foobar.com\.com RewriteRule ^(.*)$ ...
1
vote
0answers
80 views

RewriteCond if folder with parametername exists

I want to make a subdomain-redirect if a folder with the same name as the typed subdomain exists. e.g. I have some folder-structure like www.mysite.de/mainpage/hui.php and want to be able to access it ...
1
vote
1answer
73 views

How to force a subdomain as a default domain but keep other subdomains working?

I have a WordPress site installed at http://www.example.com and another testing WordPress site at http://test.example.com. I've successfully made http://www.example.com redirect to ...
1
vote
1answer
396 views

Preventing redirect loop with .htaccess parameter re-write

Let me start by saying I am not an .htaccess or Apache expert by any means. But I have the need to append a hashed term to the end of a URL query. For example: ...
0
votes
2answers
454 views

how to redirect from “https://www.example.com” to be “https://example.com”?

I want to know: How to redirect from .. https://www.example.com to be https://example.com via .htaccess or CPanel? As the SSL only installed on the one without "www", and when I visit the ...
0
votes
1answer
213 views

htaccess redirect based on cookies

I need a welcome page for new visits. If a user don0t have the cookie stored, he will be redirected to welcome page. If the cookie is stored, nothing happens. Header set Set-Cookie "visited=true" ...
0
votes
2answers
116 views

htaccess redirect on first access

I'm using a 301 redirect on my htaccess file. I was wondering if it's possible to redirect users only on their first access and then show the site normally with a rewrite condition or something ...
1
vote
1answer
154 views

why is my mod_rewrite redirect only working for the requested page and not it's necessary css, js files?

I'm trying my first steps with setting mod_rewrite to make the URLs of an application a little nicer. I have a skinnable system, with skins being set through a query parameter, so any of the ...
0
votes
2answers
62 views

.htaccess redirect for all sub-directories and files

We have a subsite a domain.com/path/ad and I want to diredirect all of the traffic to a framework handler. domain.com/path/index.cfm So far I have RewriteRule ^$ index.cfm [QSA,NS] RewriteCond ...
0
votes
2answers
72 views

.htaccess redirect just the root of my site to http

What's wrong with these redirect rules? RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} =www.pointfixed.com RewriteCond %{HTTPS} on RewriteRule ^$ http://www.pointfixed.com/ [L,R=301] ...
0
votes
1answer
394 views

Wildcards inside htaccess redirects

I need to make a rewrite rule or redirect with a wildcard included in the line. Here is an example of what i have so far that works for an individual link. Redirect 301 ...
0
votes
1answer
82 views

Redirect each request to index page

I'm trying to redirect all the user's requests to my index page, except the one made to the root folder. So www.domain.com/page.ext is fine while www.domain.com/folder/page.ext has to be redirected. ...
0
votes
1answer
86 views

Trying to Redirect from site1.com to site2.com using htaccess without changing url in the addressbar

Is there anyway I can redirect from site1.com to site2.com without having url change in addressbar. I have tried different solutions available here which are mostly for redirect rule/conditions ...
0
votes
1answer
64 views

redirection based on domain name instead of file name

I have 10.8 Server with Filemaker Server 12 running two pages in Instant Web Publishing. The pages are accessible locally: http://192.168.168.42/fmi/iwp/cgi?-db=exampleONE&-loadframes ...
0
votes
2answers
126 views

RedirectMatch: how do I avoid preserving querystring

I've noticed that the RedirectMatch directive preserves the querystring across the redirection. That is, if http://www.mydomain.com/someurl?some=query matches the rule, then it is redirected to ...
0
votes
1answer
68 views

.Htaccess - File extension gets not removed

I'm using the .htaccess below to remove the .html file extension but if someone types in example.com/test into the browser it redirects to http://www.example.com/test.html . Why does ...
0
votes
1answer
81 views

301 Redirect, need to drop file name

I have many redirects working but I have one that needs to be redirected and drop the file name. redirect 301 /path/to/file/default.aspx http://www.domain.com/newpath/to/page/ When I implement this ...
0
votes
1answer
151 views

htaccess redirect http to https causes redirect loop

I have edited my .htaccess file to redirect any http request to https://mydomain.se however, this has cause the website to fall in redirect loop. I have looked at the other solutions and compared them ...
0
votes
1answer
471 views

.htaccess with .htpasswd on site root causes redirect loop

I want to temporarily password-protect a site. I have an .htaccess file in the site root containing: AuthType Basic AuthName "Example Site Name" AuthUserFile /home/my_username/.htpasswd Require ...
4
votes
2answers
347 views

.htaccess redirect all extension to php

I recently updated my .htaccess file to hide the .php extension of the urls. It works nice, when I try to reach domain.com/index, it displays the php file. When I type domain.com/index.php it ...
0
votes
3answers
256 views

.htaccess - Redirect to https

I'm using the following .htaccess to redirect example.com or www.example.com to http://www.example.com. RewriteEngine on RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule ^(.*)$ ...
0
votes
1answer
23 views

httaccess redirect rule

I have a domain abc.com and domain has no SSL. Also there is folder "test" under the public_html. (abc.com/test). So I want to redirect all requests to https://abc.com/test to http://abc.com/test . ...
1
vote
2answers
307 views

Git Smart HTTP(S) with a URL redirect, not working

I am trying to have GitList (PHP web viewer for git) and GIT Smart HTTP(S) under the same domain git.domain.ext. The following is the actual setup: GIT Smart HTTP URLs are the form ...
0
votes
1answer
49 views

Htaccess file redirect to certain web page according to requested domain

I will put it as simple as I can. I really need your help, so one of the domains let's say example1.com is set to point to real_domain.com, basically what happens is when you type into your browser ...
0
votes
1answer
120 views

301 redirect mod_rewrite links from old affiliate system to new

I am completely new to (& am completely lost with) apache commands. I am working on a new J! installation that is intended to be a replacement of the clients existing regular html site. New site ...
0
votes
1answer
51 views

If I redirect all users (Except me) from within .htaccess, do I need a robots.txt file

So.. I have my live version of my site e.g v1.0 at domain.com I then have my development testing version at testing.domain.com I want testing.domain.com to only be accessible to me for testing, and ...