Tag Info

New answers tagged

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 ...


1

Please reverse everything you have done thus far. Please uninstall IIS Server using Programs and Features, until you understand that IIS operates on port 80(default), and that Apache is also attempting to operate on port 80. You must either choose: To Configure IIS to operate on port 80, and set Apache to operate on port 8080. To Configure Apache on port ...


0

Not sure whether this will be of any help to you. Please ignore if it was not. You will have to create two hosts files to achieve this: Host File 01: asking the server to listen at 80, for requests for localhost, and feed the root directory through port 80 to those requests. Host File 02: asking the server to listen at 80, for requests for my.domain.com ...


3

I was serving my static files using Django while my media files using Apache. Serving my static files through Apache solved this issue.


0

In my case the changing AllowOverride None to AllowOverride All in /etc/apache2/sites-enabled/000-default.conf helped. All other .conf files have already had AllowOverride All.


2

You can prevent hacking to an extent however, nothing is perfect and there are always flaws in any system. Asking a question with such little detail prevents a comprehensive insightful answer. It's advisable to read up and practice Linux and PHP security concepts. However it's impossible to make your website "hackproof", you can make it "hack-resistant" ...


1

You can do this with a single RewriteRule. The trick here is to only check for valid username characters, not everything (ie. .* - I wouldn't have thought your usernames could literally be anything?). This would also be more efficient since not every request will match and be processed. For example, assuming your usernames can only consist of ...


1

Problem fixed through one heck of a lot of perseverance. I really should take the time to learn all of mod_rewrite at some point in time… In short I solved the redirect loop with the following condition: RewriteCond %{REQUEST_URI} !^/remote.php/ The above condition basically matches everything that isn't remote.php/ANYTHING_HERE I then used the above ...


2

<FilesMatch "^(.*)\-\-.+\.(js|css)$"> FilesMatch takes a filename and matches against the file system, not the URL. The underlying file is still called "myscript.js", so this pattern should be something like: \.(js|css)$ (Aside... your example request appears to be for common.js - which wouldn't have matched your pattern anyway - shouldn't this be ...


0

User utrecht on serverfault posted this answer: The following has been tested on Scientific Linux: <VirtualHost *:80> DocumentRoot "/var/www/html/siteA" Alias /siteB/ "/var/www/html/siteB/" <Directory "/var/www/html/siteB/"> Order allow,deny Allow from all AllowOverride All </Directory> Alias /siteC/ ...



Top 50 recent answers are included