Tag Info

New answers tagged

2

Triying the same and on my search I found that symfony2 frameworks .htaccess file is doing that at least it is stated in the file that it would. I tried to use it in my own setup but didnt work. Maybe that will help you guys somehow. # Determine the RewriteBase automatically and set it as environment variable. # If you are using Apache aliases to do mass ...


2

For Q1, the - doesn't mean that processing or iteration would be stopped, simply that the URL path would be passed through without any filtering or processing. The file will continue to execute rules until it reaches the end of the file or a rule is met that has the [L] last rule flag appended to it. To clarify then, RewriteRule .* - ...


1

As w3d suggested in the comments, you have an open parenthesis, but not one to close it RewriteEngine On RewriteCond %{HTTP_HOST} ^(www\?sek-muenchenstein\.ch$ [NC] # right here -------------^ RewriteRule ^(.*)$ http://muenchenstein.sek-am.ch/ [R=301,L] Also, in the COND line, you have www\?. I think this might be wrong too, it's now literally looking for ...


0

I have realized that www.succeedonline.co.za does not yet redirect under the non-www site under the https protocall. It does however work fine under the http protocall. Here is an extract of my complete .htaccess file: RewriteOptions inherit RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ...


0

You could also take the approach of multiple rewrite rules. Replace example.com with your actual domain name. RewriteEngine On RewriteCond %{HTTPS} off # HTTPS is off! # Redirect to the secure canonical URL RewriteRule (.*) https://example.com/$1 [L,R=301] RewriteCond %{HTTP_HOST} !^example\.com$ [NC] # Host name is not correct! # (maybe it has a www?) ...


1

Not sure if this would encompass your goal completely, but this would turn http www mode into https non-www mode: RewriteEngine On RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] RewriteRule ^(.*)$ https://example.com/$1 [R=301,L] Then to redirect the whmcs to a new url, you can probably use a simple 301: Redirect 301 ...


0

Try this: #gateway.school.edu virtual host RewriteCond %{REMOTE_ADDR} ^10\.(.*)$ [OR] RewriteCond %{REMOTE_ADDR} ^172\.(.*)$ [OR] RewriteCond %{REMOTE_ADDR} ^192\.(.*)$ RewriteRule .* reset.school.edu [R=301,L] The .* is a wildcard. The \ escapes the . which anchors the match allowing it to be taken literally. The () may not be necessary- it is usually ...



Top 50 recent answers are included