URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
9 views

rewrite rule in directory tag in httpd.conf not working

my server info: Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.9 Server at localhost Port 80 httpd.conf: <Directory "C:xampp/htdocs/laravel_project"> <IfModule mod_rewrite.c> ...
1
vote
0answers
8 views

Apache rewrite rule for multiple named virtual hosts with a 'catch all' rule

I have a redirect apache server that I setup for about 30 domains. I want to have all requests get redirected to the main server except for 1 domain. Basically any domain coming to this server gets ...
0
votes
1answer
44 views

Apache 404 returning 500 errors. Request exceeded redirects

I'm trying to setup a site with static HTML with Apache 2.2.22, but I'm getting a 500 error instead of 404. The message in the error log is: [Sun Dec 14 09:48:45 2014] [error] Request exceeded ...
4
votes
3answers
53 views

Block traffic behind AWS ELB

My web servers are behind ELB, I want to block traffic from some specific user agent which is a DDOS attack. Apache always see ip address of ELB as an end user so I tried below attempts: Blocking IP ...
0
votes
0answers
28 views

Rename file in apache

I maintain large files versioning on a server. Files are stored rewrited (hashed) on several folders, such as : For file test.avi : FOLDER1/aeriuyzekjshdfkjh FOLDER1/aeriuyzekjshdfkjh#1 For file ...
1
vote
0answers
32 views

Apache mod_rewrite rule to pass specific REQUEST_URI to specific html files

I have a very basic html presentation which I want to use Apache mod_rewrite to handle the URLs. home.html is just an intro page but I want this to be called when there is no REQUEST_URI ...
0
votes
0answers
10 views

301 redirect with mod-alias and mod-rewrite

my htaccess file has these lines: RewriteRule ^newlink ?do=something Redirect 301 /oldlink/ /newlink when i write http://www.example.com/oldlink/, browser redirects to ...
0
votes
1answer
21 views

How to get hostname into rewriterule [duplicate]

We've got a few subdomains setup, and I want to simplify some apache configuration - particularly as these particular subdomains are volatile. Anyway, I'm trying to get a rewrite rule that include the ...
1
vote
1answer
81 views

Does a wildcard subdomain (*.example.com) in Apache config also include the root (example.com)?

Does anything in an Apache config file (like ServerAlias, RewriteRule, ...) that has a wildcarded line like *.example.com also include the root example.com or do I have to separately add this ...
0
votes
1answer
18 views

Configuring a server-wide RewriteRule in conf-available

Lately I have been getting some referrer spam in my website's logs. In order to stop this (as it's quite annoying and also polluting my statistics), I want to block requests that are coming from ...
-1
votes
1answer
42 views

Excluding a directory from a root .htaccess rewrite rule to disallow from caching

On my lamp installation, I have in the root folder "/" (mydomain.org) a wordpress multisite with W3 total cache activated, I have also a sub_dir called "sub" (mydomain.org/sub) with a PHP script ...
0
votes
0answers
13 views

Rewrite condition on apache with ezpublish [duplicate]

I have a problem with setting up my rewrite rules on apache. I work on centos 6 with apache and ezpublish. I own the domain example.com and I have things set up like below: www.example.com/support ...
-1
votes
2answers
38 views

Strip part of URI with mod_rewrite [duplicate]

I have this rewrite rule to direct request to my symfony 2 application: RewriteCond %{REQUEST_URI} ^/foo/.*$ RewriteRule ^/foo(/.*)$ /srv/webapps/symfony2/web/app.php [QSA,L] ...
3
votes
1answer
35 views

Apache Reverse Proxy Unescapes URL

I am running Apache 2.2.15 as a reverse proxy in my DMZ. I have an application on the internal network that I make available on the Internet for staff to use by going through the reverse proxy. As ...
0
votes
1answer
32 views

Apache proxy to Glassfish - How to supress subfolder in URL?

I've got a single linux server running Apache/2.2.24 running both HTTP/HTTPS along with a Glassfish 3.1.2 server listening on port 8080. Glassfish runs a single deployed application which has ...
0
votes
0answers
26 views

Cannot set up mod_rewrite with XAMPP [migrated]

I'm trying to enable mod_rewrite on a XAMPP 5.6.3 installation. I've been following these guides: http://www.leonardaustin.com/blog/technical/enable-mod_rewrite-in-xampp/ ...
2
votes
1answer
37 views

Can Apache .htaccess convert the percent-encoding in encoded URIs from Win-1252 to UTF-8?

I want to add a directive in my .htaccess, such that if the browser is pointed at a URI containing %E4 (ä) - or any other special character - the .htaccess automatically rewrites %E4 (ä) as %C3%A4 ...
2
votes
1answer
53 views

Blocking all users without referrer BUT allowing Googlebot/bingbot at the same time (with .htaccess)

Because of some amateur-made DDOS attack on my website, I had to deny some traffic with .htaccess which worked fine. Unfortunately, it also blocks the googlebot/bingbot: order allow, deny deny from ...
0
votes
1answer
15 views

.htaccess entry to return simple text based on the URI

I have URL http://foo.com/bar?abc=123, what would be the correct entry in the htaccess file to return a simple text 200 status of abc=123? Basically, I just want to return the entire query string as ...
1
vote
0answers
22 views

Apache2 mod_rewrite, handling the optional “/” at the end of a URL

I am attempting to host a single custom page to set as my homepage on my server. The real path to the page is example.com/start.html. However, I do not want this ugly URL in my homepage so I am ...
0
votes
1answer
18 views

apache mod_rewrite scenario subdomain capturing from the http_host and passing it as subdomain to other url while rewriting it [duplicate]

i am trying to write two rewrite rules which are PASS THROUGH or PROXY so that i can hide the underlying url. Case1: When a request comes to app.domain.com/folder1/folder2/ it should go through ...
0
votes
1answer
15 views

Apache2 retrieve files from another folder when not found

While working on an application rewrite, I'd like to keep the old app webroot files as a fallback, when the new files are not found. There are 2 applications: <VirtualHost *:80> ServerName ...
-6
votes
0answers
37 views

Convert Nginx rewrite to htaccess [duplicate]

Nginx rewrite: if (-d $request_filename) { rewrite ^/?$ /get_doc.php last; break; } if (!-e $request_filename) { rewrite ^/?admin /get_admin.php last; rewrite ^(.*)$ ...
0
votes
1answer
59 views

Force SSL for every URL except one path using .htaccess

I'm trying to enforce SSL for every URL except one with the first segment /preview. http://test.example.com/preview/blah/blah should be ignored by the rule; every other URL should be forced to use ...
0
votes
0answers
10 views

Rewrite old mediawiki URL pattern to short URL format and rewrite old URLs to support new format [duplicate]

We have been running a mediawiki installation for some years now. During an upgrade to a newer version, we decided to switch to the short url pattern wikipedia uses. This is working fine. So our ...
0
votes
0answers
7 views

wrong REQUEST_FILENAME if subfolder has the same name as the host

I got the following problem: I have a local wamp server with a virtualhost called admino. The needed vhost-info for that host is: <VirtualHost *:80> ServerAdmin arne@gmail.com DocumentRoot ...
0
votes
0answers
21 views

Apache rewrite isn't redirecting on ec2

I'm using Elastic Beanstalk with Amazon. I'm trying to setup Apache virtual host on the ec2 instance. No matter what I try, it doesn't seem to work. I'm using the following examples. ...
0
votes
1answer
77 views

Joomla URL Rewriting works automatically in Nginx

This is driving me nuts and I dont understand how this works automatically. I have nginx as my web server and I have installed Joomla that has URL Rewriting which removes the index.php from the URL. ...
0
votes
0answers
26 views

Apache Alias and Mod_Rewrite For WordPress?

I have a site that is running WordPress, anothersite.com, and I am trying to access that site through a different domain, mydomain.com. The goal is to have mydomain.com/anothersite act just like it ...
0
votes
1answer
23 views

Include more than one file in negative RewriteCond

I'm using this rule to ignore index.php in rewritte rule: RewriteRule ^((?!index\.php)[^/]+)/?$ galeria.php?nome=$1 [L,QSA,NC] But I need to include bio.php and contact.php in this rule. How can I ...
0
votes
2answers
33 views

Apache Alias to link to another DocumentRoot

I have a WordPress installed in /var/www/wordpress/ and my own code in /var/www/project/ Now comes the following problem: When I try to access example.com/client/ or example.com/admin/ it should link ...
0
votes
0answers
34 views

Converting .htaccess to lighttpd rewrite rules for Chevereto

I am trying to translate Apache2 htaccess rules to lighttpd rewrite rules. My lighttpd version is 1.4.33. Chevereto uses the G\ php microframework. Apache2 htaccess rule i am trying to convert: ...
0
votes
1answer
34 views

How to redirect from ?page_id=… (apache)?

I have website at Wordpress. And it is webpage in Wordpress www.my-domain/?page_id=111 Now I need to create page outside of Wordpress (at the same server) and direct traffic to it instead of ...
1
vote
1answer
77 views

Apache mod_rewrite - redirect all traffic to another domain, except in 5 folders

We are gradually moving a clients site to a new system & domain name. In the meantime we need both sites live - but sharing bits of the same domain. I have now pointed the primary domain to the ...
0
votes
1answer
19 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
19 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
25 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
54 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
193 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
42 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
95 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
32 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 ...
1
vote
0answers
54 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
28 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
40 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
90 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
40 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
93 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
29 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
110 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 ...