Linked Questions

0
votes
0answers
18 views

How to use mod_rewrite to redirect page based on browser

mod_rewrite is apparently the way to go with that. This question explains the general syntax, but not the way to do it. I found this page on redirecting and remapping with apache, you can aprently ...
0
votes
1answer
2k 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. ...
1
vote
4answers
2k views

rewrite URL in htaccess and remove everything but parameter

Is it possible to turn this URL: example.com/send.php?url=google.com&name=&submit=submit Into this URL: example.com/google.com When I try I just keep getting 404 or 500 errors and it's ...
1
vote
2answers
10k views

Apache: Request exceeded the limit of 10 internal redirects due to probable configuration error - WooCommerce

I have a woocommerce site. I have a recursive error in the Apache error.log: [Mon Nov 02 17:04:58.723578 2015] [core:error] [pid 2922] [client 172.31.12.207:19044] AH00124: Request exceeded the limit ...
0
votes
1answer
86 views

Why rewrite rule for IP address shows “Not secure” whereas domain name works well in Apache2?

I created ssl certificate for myDomain.com Hence I see following 3 files under /etc/apache2/sites-enabled in Ubuntu example.com-le-ssl.conf example.com.conf example.conf My example.com.conf looks ...
2
votes
1answer
4k views

mod_rewrite Proxy - maintain host headers

I am using mod_rewrite to proxy a sub-directory like this: RewriteRule ^somedir/(.*)$ http://proxy.example/somedir/$1 [P,L] That means that requests to http://local.example/somedir are proxied to ...
438
votes
8answers
155k views

How does IPv4 Subnetting Work?

This is a Canonical Question about IPv4 Subnets. Related: How does IPv6 subnetting work and how does it differ from IPv4 subnetting? How does Subnetting Work, and How do you do it by ...
-1
votes
1answer
1k views

rewriting a URL where a subfolder should not be visible

I have multiple domains setup with my webspace (all via a hosting provider) So www.maindomain.example links to /maindomain on my webspace. www.domain2.example links to /domain2 on my webspace. Pretty ...
1
vote
1answer
1k views

How to match a string in URI with regular expression? [duplicate]

In my Apache config httpd.conf, I wish to setup a rule like below SetEnvIfNoCase %{QUERY_STRING} ^.*(getBook+)$ no-gzip dont-vary I am hoping to do no-gzip when my URL looks like http://myurl.fake....
0
votes
1answer
46 views

Rewrite domain to subfolder using HTTPS [duplicate]

How correctly to rewrite domain to a subfolder with HTTPS ? This will just redirect all request to subfolder1 RewriteCond %{HTTP_HOST} ^(www.)?example1.com$ RewriteRule !^subfolder1/ subfolder1%{...
0
votes
2answers
74 views

URL Redirections [closed]

I have registered 3 domains with .com, .co.in and .in extensions. My .com domain is hosted. I want users to be redirected to the .com website when they type in the .co.in and .in urls. How do I do ...
1
vote
1answer
29 views

Apache ssl.conf RewriteRule [duplicate]

The stuff after the #### are just to tell you what I am doing and it's not actually part of my ssl.conf file Trying to modify an ssl.conf configuration to do the following... RewriteCond %{...
0
votes
0answers
16 views

Wordpress post URL hide and encode via htaccess [duplicate]

Say, I have a wordpress site. If anyone visit my post like https://example.com/my-post-name then he will be redirected to https://example.com/hjbfdbferyuyebe4terfndfnej4jdsd==. How can it be ...
0
votes
1answer
2k views

apache2 redirecting https to http [duplicate]

[tl;dr] Why is apache redirecting https that has gone through rewrite engine to http I have a site that is redirecting some pages (only ones that have been through rewrites) from https to http. ...
0
votes
1answer
2k views

force HTTP to HTTPS Centos 6.7 and Apache not working correctly [duplicate]

I tried adding to the .htaccess file RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://mywebsite.com/$1 [R=301,:] I also tried (in the httpd.conf file) <VirtualHost *:80&...

15 30 50 per page