URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
8 views

GIF loses mime type with Apache rewrite

Got problem with a gif that loses it's animation with the rewrites I'm doing. RewriteRule ^journal/(.+)\.(jpeg|jpg|png|mp4|webm|ogv)$ app/uploads/journal/$1 [QSA,L] RewriteRule ^journal/(.+)\.(gif)$ ...
0
votes
1answer
9 views

Route request to Tomcat only if file doesn't exist on disk

I have Apache in front of my Tomcat installation as a reverse proxy. Most URLs are routed to Tomcat by a JkMount directive in Apache. For one URL pattern I'd like Apache to route requests to the ...
1
vote
1answer
12 views

How can I deny access to a folder in OpenLiteSpeed similarly to the way Apache does it?

I'm trying to deny access to a folder for a website that is hosted with OpenLiteSpeed v1.4.2, but I'm have trouble. I take it that .htaccess isn't supported in OpenLiteSpeed so I am unable to just put ...
0
votes
1answer
39 views

apache rewrite rules for multimple domains | https://www

I have two applications configured on one apache (eg. example.com and test.net). Rewrite rules for those apps are the same (so in config file for domain example.com I've got this rules, and the same ...
0
votes
0answers
18 views

Is it possible to rewrite a GET request to look like a subdomain in Apache? [duplicate]

I'm not sure this is possible, it sounds a bit 'out there', but can a GET request be rewritten in Apache to look like a subdomain? For example, I have a URL like this: ...
0
votes
0answers
44 views

mod_proxy_fcgi and php-fpm with apache 2.4 mod_rewrite vs proxypass, neither solution perfect

If I use mod_rewrite with the P flag most things work right: <Directory /home/dir/public_html/www.site.com> AllowOverride All Options FollowSymLinks Require all granted ...
0
votes
0answers
24 views

Apache + WebDAV: Redirect user to an individual subdirectory (with the use of WebDAV clients)

I'm trying to set up WebDAV and would like to provide a private "Home Directory" for each user. When a user connects to the WebDAV server, he should be automatically redirected to his home directory ...
-1
votes
1answer
37 views

“Simple” .htaccess rewrite for sites in subfolders not working [duplicate]

I have a catch-all Apache virtual host in /var/www/. In it, I have a index.php that handles all the code for pages, and subfolders holding the resources for each site (images, css, etc). I want a ...
0
votes
0answers
10 views

Apache configuration redirect using only redirect, not rewrite

PS: this is the 2nd part of the question originally posted here. I'd like to disable the HSTS header completely for specific virtual hosts. I have (per recommendation) a redirect in the 443 container ...
0
votes
0answers
34 views

Apache mod_proxy cuts off URLs at spaces

I have the following proxy rule on www.example.com/.htaccess RewriteEngine On RewriteRule ^(.*)$ http://www2.example.com/$1 [P] Requests for ...
0
votes
1answer
23 views

Apache Redirect for Internal Traffic Only

We have a page, gateway.school.edu, where users have to fill out a recaptcha before being directed forward to our password reset. I would like any internal traffic, any user agent on our network with ...
-2
votes
1answer
28 views

apache redirect problems with secure connection [closed]

in my default-ssl.conf: <IfModule mod_ssl.c> <VirtualHost _default_:443> ServerAdmin my.name@someplace.cool ServerName the-checkout-tech.com:443 ErrorDocument 404 ...
0
votes
1answer
42 views

htaccess conditional redirect to https

So i'm trying to redirect to https all visitors except my internal networks 192.168.x and 10.x RewriteCond %{HTTPS} off RewriteCond %{REMOTE_ADDR} !=(192\.168\.$|10\.$) RewriteRule (.*) ...
0
votes
0answers
18 views

How to set up an Apache ssl proxy for multiple sites using mod_rewrite or proxypass

(I asked this at stack overflow but no one even commented ;( perhaps it's better suited here I hope?) Some background: I wish to access some https sites on a separate VLAN to what my laptop is via a ...
0
votes
0answers
60 views

Apache Directory index doesn't work but index.html yes

2 hours, 2 hours struggling with that. www.domain.com/index.html works, but www.domain.com show indexes, if i click on the index.html, nothing happens. This is the virtuahost. NameVirtualHost *:80 ...
0
votes
0answers
23 views

Move query string to path in proxy - Apache

I am setting up Apache to proxy files from Amazon S3. The initial urls have query strings, but query strings can't be passed to S3, so they are stored as paths with question marks in them (which then ...
0
votes
0answers
67 views

302 redirect on all pages of website, creating crawler issues

My website is having difficulties working with Facebook/LinkedIn/social crawlers. I think this may be due to the redirect headers it seems to be returning. Browsers can access the site completely ...
2
votes
3answers
64 views

nginx [emerg] unknown “0” variable

I've been trying for two days to convert an .htaccess to nginx rewrite the original file looked like this: # Turn on URL rewriting RewriteEngine On RewriteBase // # Protect hidden files from being ...
0
votes
1answer
52 views

RewriteRule not working properly in my ubuntu server 14.04 running in Windows Azure

In my server I kept signup.php and in htaccess I kept this thing - RewriteRule ^registration/$ signup.php [nc] However it's working fine in my Windows machine running Wamp. But not ...
0
votes
1answer
12 views

Alter RewriteRule to change parameter results

Here is my Apache 2 Directory configuration: <Directory /var/www/html/website/> Options +SymLinksIfOwnerMatch RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f ...
0
votes
1answer
91 views

Configuring .htaccess on a site with a CodeIgniter app and traq issue tracker

I have this site running on CodeIgniter and I have installed traq for issue tracking. Under public_html I have my application and system directory as well as an assets directory, and also traq. i.e.: ...
2
votes
1answer
129 views

Apache, htaccess, url rewrite

I have .htaccess file I'm using for testing, here is my file: RewriteEngine On RewriteCond %{REQUEST_URI} ^/([a-z-]+)/?$ [NC] RewriteRule ^ %{REQUEST_SCHEME}://%{SERVER_NAME}/?title=%1 [L] I'm ...
0
votes
0answers
5 views

mod_rewrite: Use Substitution from Previous Condition

I'm trying to do a basic language redirect based on a cookie. To do that and prevent a loop, I need to check that the user isn't already on the correct URL, so I wrote this rule: RewriteCond ...
0
votes
1answer
48 views

Logging 403 Rewrites for Brute Force Attacks

As explained in Wordpress Codec, I want to prevent brute force attacks for wp-login.php via RewritetRule. http://codex.wordpress.org/Brute_Force_Attacks#Deny_Access_to_No_Referrer_Requests Rather ...
-2
votes
1answer
38 views

Allow access to a folder except specific files and folders using a RewriteRule exception in Apache2

I'm having issues redirecting a website at work to a new URL. The redirect of the site works just fine. An exception to the redirect works as well. The problem is that I need multiple exceptions. I ...
0
votes
2answers
39 views

Rewriting a download URL, but “save -as” dialog shows original URL

I have the following mod_rewrite directive in my lighttpd config file: url.rewrite-once = ( "foo.*$" => "static/foo.pdf", ) I'd like to hand out URLs like this: ...
1
vote
0answers
21 views

Apache Internal RE-WRITE to replace 301 redirect

I need to internally rewrite (due to partial CMS content restructure) as I currently have a permanent 301 redirect and it is killing SEO. I do not want the users browser to redirect or know about the ...
1
vote
1answer
34 views

Apache Rewrite Rules

I have moved my website from a Wiki to Wordpress and in the process, realised that I have broken links to some popular pages on my website. Is it possible to fix this with a rewrite rule? I need the ...
0
votes
1answer
53 views

Apache mod_proxy

Uggh, I'm spewing that I can't figure this out, I'm so frustrated: <VirtualHost *:80> servername domain1.com.au ServerAdmin webmaster@localhost DocumentRoot ...
-2
votes
1answer
21 views

mod_rewrite redirect any domain except principal domain to the principal domain [duplicate]

I have some rules as follows: RewriteCond %{HTTP_HOST} ^domain.com RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent,L] I would like to make the rewrite condition match ANY domain OTHER than ...
0
votes
2answers
40 views

RewriteRule Works With “Match Everything” Pattern But Not Directory Pattern

I'm trying to redirect newsletter URLs from my local server to an Amazon S3 bucket. So I want to redirect from: https://mysite.com/assets/img/newsletter/Jan12_Newsletter.html to: ...
-1
votes
1answer
53 views

Exclude location from nginx if directive

Currently I use this for redirecting everybody to the SSL page: if ($scheme != "https") { rewrite ^ https://$server_name$request_uri? permanent; } does someone know how to exclude a specific ...
1
vote
1answer
31 views

Apache Proxy and Rewrite Rule for Proxy

I set up my Apache server as a proxy for a local server listening on port 8080. It works no matter if I specify a valid proxy or not. Both configurations work. Configuration 1: <Proxy ...
-2
votes
1answer
106 views

Nginx rewrite rule not working

Can someone help me convert this rule? I have over 50 rules, but I can not make this rule work: #APACHE RewriteRule ^([^/]*)/([^/]*)\.html$ /?cmm=$1&page=$2 [L]
1
vote
1answer
250 views

Apache 2.4/PHP-FPM ProxyPassMatch and access restriction

I've got Apache/PHP setup exactly like this: https://wiki.apache.org/httpd/PHP-FPM It includes the ProxyPassMatch rule as mentioned: ProxyPassMatch ^/(.*\.php)$ ...
0
votes
0answers
46 views

Custome page when Apache Server is down

I've looked at Apache ErrorDocument directive on how to do this. I found an answer here and it mentioned : You should use a URL to point to your ErrorDocument otherwise if you use a filesystem ...
0
votes
2answers
114 views

FreeBSD Apache 2.4 rewrite/proxy module errors

Just set up a FreeBSD jail to run httpd in it and all works good except these two, rewrite/proxy modules. These are error logs excerpts: mod_rewrite error: [rewrite:crit] [pid 43447] ...
0
votes
1answer
27 views

Possible to map a directory to another server (for independant Wordpress install)?

We have EC2 instances that I would like to not contain a wordpress install, and instead ideally map a folder to a different server, and run it under the same domain. For some reason, this is ...
1
vote
1answer
61 views

Apache: Add a prefix to all URLs in a virtualhost

In one of my machines I have an internal server which listens at port 8090. I am using a virtualhost in Apache to proxy the internal server using a URL like servera.mydomain.com: <VirtualHost ...
0
votes
0answers
84 views

Apache Alias on multiple vhosts + redirect rules

I'm facing a tricky problem and I have problems to solve it through Apache config. I have two vHosts on my machine: A) /var/www/front/web app.domain.ext B) /var/www/api/web api.domain.ext This ...
1
vote
1answer
112 views

mod_rewrite exact hostname match with multiple conditions

I have a set of requirements for mod_rewrite that is breaking my head. Any hints / pointers would be appreciated: domains: www.domain-europe.com www.domain.com requests for www.domain-europe.com ...
0
votes
1answer
86 views

Apache rewrite to remove “www” not working (globally)

I've taken the Apache Server Configs global .htaccess file and placed it on my web server, as /etc/apache2/apache-server-configs.conf. Then in my /etc/apache2/apache2.conf file I've got this towards ...
0
votes
0answers
46 views

Can you do a masked URL rewrite to a different protocol (in Apache)

Apache 2.2.15; I want to do: RewriteCond %{HTTP_HOST} site1.com RewriteRule (.*) https://site2.com [R=301,P,L] But that does not work. I put the P in there thinking it might allow the mod_proxy ...
0
votes
0answers
68 views

Proxy to SSL site (on another server) from a non SSL site

I have a *:80 virtual host in Apache 2.2.15 which is just a bunch of URL rewrites like: ServerAlias foo.bar biz.baz tit.tat RewriteRule / http://somesite.com (R=301,L) ServerAlias ...
0
votes
0answers
112 views

Showing only domain with .htaccess and mod_rewrite

I currently have koken installed to my website (wythDOTno-ipDOTbiz/koken). I know that the .htaccess file in the koken folder is working, because it is making the url's clean by removing the ...
0
votes
0answers
364 views

nginx rewrite for php restful api apache htaccess

I have an apache htaccess file used with Restful API tutorial <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-s RewriteRule ...
0
votes
1answer
17 views

Does RewriteEngine On enable for all subsequent vhosts

If I have in my conf.d Apache directory 001_vhost.conf 002_vhost.conf ... etc, does Putting RewriteEngine On in 004_vhost.conf enable the Rewrite Engine for 005 006 007 008 etc vhosts, but not those ...
0
votes
1answer
49 views

can htaccess file define different RewriteBase for production and dev servers

I have htaccess files that use different RewriteBase on production and dev (windows) pc. Currently I change the RewriteBase manually when deploying. Can this be done automatically with some ...
0
votes
1answer
22 views

Setting up additional breadcrumb re-direct using mod_rewrite

Currently I have mod_rewrite configured as follows: <VirtualHost *:80> ServerName address.website.org ServerAdmin webmaster@website.org DocumentRoot /var/www Redirect permanent / ...
1
vote
1answer
109 views

Why can't I redirect url's with “index.html” in it to a php file?

I'm stuck in a big problem, but let me start with one part of it. I am wodering why this works: RewriteRule ^(.*)index.html $1 [R=301,L] while this doesn't: RewriteCond %{REQUEST_FILENAME} ...