URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

1
vote
0answers
8 views

mod_rewrite date subfolder not working

I am having a strange issue that I am perplexed on. I will prelude with that regex is not my strong suit. I need feedback from the community to get this going. If I have the following URL: ...
1
vote
1answer
13 views

Denying a User-Agent in apache that uses mod_proxy

I want to prevent web crawlers from using an apache site that is configured to forward all requests to a ProxyPass. I have tried the BrowserMatchNoCase directive to set an environment variable ...
0
votes
2answers
24 views

How to rewrite URI from root if file doesn't exists in folder?

I have a static folder which is not in my document root. I would like to redirect all the files that are not present in document root, but are present in the static folder. (So if the same file is in ...
0
votes
0answers
24 views

How to point at all subdomains of a secondary domain to the main domain

I have a secondary domain name which I need its subdomains to point to my main domain. For example,If my main domain is example.com, then I have used example.org to point to the former. What I desire ...
0
votes
0answers
17 views

RewriteCond and LocationMatch

I am running a Magento instance and am trying to tune the browser cache headers appropriately. All requests should have cache headers set, except for the checkout pages (any url that like ...
0
votes
1answer
24 views

Reverse proxy Apache rewrite rule doesn't work

I've an apache reverse proxy and i try to make a rules for redirects few urls of example2 to example1 but my rewrite rules doesn't work. I've try this in the vhost of example2 : ProxyPass / ...
0
votes
1answer
18 views

Test file existence outside DOCUMENT_ROOT

I have this .htaccess file inside DOCUMENT_ROOT where it checks for the existence of a file, maintenance.enable and serves maintenance.html if it is present: <IfModule mod_rewrite.c> ...
0
votes
0answers
6 views

Apache mod_rewrite with proxy to HTTPS from HTTPS host

I am trying to use the mod_proxy to rewrite internal one URL to another in this way: RewriteCond %{HTTP_HOST} ^www\.domain\.de$ RewriteCond %{SERVER_PORT} ^443 RewriteRule ^blog/(.*)$ ...
0
votes
1answer
24 views

Mediawiki migrate existing wiki page to shortURL without afecting SEO (maintain old links)

Following the steps at: http://www.mediawiki.org/wiki/Manual:Short_URL http://www.mediawiki.org/wiki/Manual:Short_URL/Apache I have already migrate my wiki page from URLs: ...
0
votes
1answer
7 views

apache allowoverride points to wrong location

I installed a Slim framework to create a API and located this under /opt/modul/www/api index.php slim/ so the index.php is my main API file. And I want to access this in the browser under ...
0
votes
1answer
31 views

Mod_rewrite Underscores to Dashes (or Hyphens) in Opencart

I'm transferring an e-commerce site to a new shopping basket. For some reason the old site used dashes for categories but underscores for products. So the full url of a product looks like this: ...
0
votes
0answers
14 views

Apache rewrite rule not transforming URL as desired

I have an Apache site running that should only be accessed via HTTPS. What we wish to ensure is that if the site is called by it's DNS shortname (example, https://webserver01 rather than ...
1
vote
2answers
45 views

Why is everything after RewriteEngine On ignored?

So I'm trying to get mod_rewrite working on my new site. I've used mod_rewrite successfully a few years ago, but this time not a single command after 'RewriteEngine On' works. I'm getting exactly the ...
0
votes
0answers
13 views

Apache mod_proxy redirect with absolute domain

I am using the example from apache to rewrite a url with proxy: RewriteRule ^widget/(.*)$ http://product.example.com/widget/$1 [P] I want to set a absolute domain for this: RewriteRule ...
-3
votes
0answers
39 views

Nginx mod_rewrite enabling

I just moved a Wordpress blog on anew hosting account. Previosly the hosting was on Apache, now is on Nginx. I have a problem that now Wordpress pretty links (post-name) are not working and I think ...
0
votes
2answers
54 views

Decrypt a Header in Apache (HTTPD)

I've been asked to have a look at whether it's possible to decrypt a header during the processing of the request. The specific use case is to respond to the decrypted contents of the header by ...
0
votes
1answer
13 views

Rewrite rule for custom parameter

I need to write a rewrite rule that will do the following: When user enters mysite.com/whatever, this address will stay in the browser but in the background following address will be called: ...
0
votes
1answer
17 views

Can I not setup multiple redirects using apache?

I have single web application on the server with multiple domain names (pittsburgh-app.com, philadelphia-app.com, etc). Now the domain names are changing to (new-pittsburgh-app.com, ...
-1
votes
1answer
26 views

Redirect domain to specific URL on other domain [duplicate]

I have got apache2 server with one virtual host. It is typo3 CMS. There are multiple pages: foo.com -- DNS A record --> 32.32.32.32 |_ foo.com/bar/ |_ foo.com/baz/ Now I want to configure ...
-1
votes
1answer
24 views

How to make a RewriteRule on Apache .htaccess to fix a broken image? [duplicate]

My page has: <img src="/?cp_contactformtoemail_captcha=captcha&a=1&b=2&c=image.jpg" id="captchaimg_1" alt="security code" border="0"> But it should be: <img ...
-1
votes
2answers
111 views

Why is enabling the rewrite log in .htaccess not working?

I want to enable rewrite logging so that I can debug a rewrite rule but adding the RewriteLog directives is causing a 500 error. Version information: Ubuntu 14.04 Server version: Apache/2.4.12 ...
2
votes
0answers
35 views

Apache rewrite works under FreeBSD, not under CentOS

I have 5 production servers which are running FreeBSD 9.2, but we are planning on transitioning to CentOS. Because of this, I am attempting to set up some virtual machines to emulate our production ...
0
votes
0answers
12 views

How to redirect a single char > with mod_rewrite

How to redirect a single char > with mod_rewrite ? I've tried so far and it doesn't work: RewriteRule ^%3E index.html RewriteRule ^/%3E index.html RewriteRule > index.html RewriteRule /> ...
0
votes
0answers
37 views

how to serve a single page application with openshift

I'm tryng to deploy a single page app on openshift. On openshift all the static contents have to be in wsgi/static dir, but I obviously want to serve my static index.html from the root. Every attempts ...
0
votes
0answers
39 views

Dynamic Subdomain with htaccess unchanged URL

I have a Codeigniter project Located at "domain.com/users/abc" directory. I want to access it with Subdomain "abc.domain.com/" and also I don't want the url in the address bar to change. There will ...
0
votes
0answers
62 views

Redirect the direct links to static files from non-www to www

My website is using WordPress 4.1.1, multisite, subdomain install. I've changed it from non-www to www successfully after updating the database ( ...
0
votes
1answer
55 views

mod_rewrite errors when migrating from Apache 2.4 to Apache 2.2

I have a list of rewrite rules stored in my website's .htaccess file, rewriting URL's like http://example.com/cloud/something to http://example.com/cloud/index.php?page=something. These rules worked ...
0
votes
0answers
34 views

Apache RewriteRule: bad flag delimiters

RewriteEngine On RewriteBase / RewriteRule ^/wheel_([A-Za-z0-9- ]+)_([A-Za-z0-9- ]+)$ /wheels.html?Brand=$1&Name=$2 [NC,L] This is the entire content of my .htaccess file. No error when I ...
0
votes
0answers
48 views

mod_rewrite path info postfix and per-dir prefix

There's an issue with .htaccess configuration. I just need the url /category to match the category.php script, but when I try to open this url, there's a 404 error instead. Here's my .htaccess: ...
1
vote
1answer
37 views

Apache2 Reverse Proxy - different handling or urls

I struggling with a reverse proxy configuration and specific rewriting/proxypass depending on URL-path. Szenario: Reverse Proxy in DMZ SSL ends on Reverse Proxy Requests should be passed to ...
0
votes
0answers
13 views

How to allow connections from a Squid proxy AND another IP-range using mod_rewrite?

I have two virtualhosts on Apache. I will name one admin.example.com. I will name the other virtualhost blog.example.com. In my local network, there are some users under a Squid proxy. I want to ...
0
votes
0answers
50 views

What am I doing wrong in this code?

I want to redirect any request, adding a ".php" at the end of the request URI. But, if the URI has a slash ("/") at the end, I want to remove it and add .php at the end of the URI. The code below ...
0
votes
0answers
15 views

mod_jk mount is being bypassed by virtualhost rewrite rule

I have apache 2.4 and tomcat 5 configured with mod_jk. My webapp "dealernet" could be accessed without the port 8080 suffix directly at http://prefixa.mydomain.com/dealernet/login/login.do and life ...
0
votes
0answers
7 views

htaccess rewrite rule for subdomain results to redirect loop [duplicate]

Below is my htaccess config: RewriteEngine On # if the domain starts with "apply." # i.e. apply.example.com # redirect to application URI RewriteCond %{HTTP_HOST} ^apply\. [NC] RewriteRule ...
-3
votes
1answer
47 views

Redirect non www to www not working [duplicate]

I have created an .htaccess file with the following code in order to achieve this Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^example.lk[nc] RewriteRule ^(.*)$ ...
0
votes
0answers
52 views

Apache 2.2.2 (Debian) mod_rewrite with mod_proxy removes the query string

I try to setup a reverse proxy configuration based on query string rewriting with Apache2, mod_rewrite, mod_proxy (and also mod_auth_cas, but I don't think it deals with my problem). The request flow ...
0
votes
1answer
87 views

How do I remove index.php from url in CodeIgniter 2.2 [duplicate]

I have tried all the methods I can find on the web but nothing seems to work. I still get a 404 page. I already modified $config['index_page'] = ''; and add the lines to .htaccess as suggested by the ...
1
vote
0answers
10 views

Can mod_rewrite [P]roxy to an HTTPS url when the inbound request URL is HTTP?

I have a host (IIS6, running an implementation of mod_rewrite for windows, by a co called Micronovae. It works well) that has a site at http://some.host.com I also have another host (on Microsoft ...
0
votes
2answers
67 views

Apache mod_rewrite : RewriteRule to pass requests tomcat application [duplicate]

I am having difficulty defining a correct RewriteRule to forward requests to an application running in tomcat. I have apache with mod_rewrite enabled as well as tomcat setup with an application ...
1
vote
0answers
14 views

Apache Rewrite of HTTPS on another specific port with hidden subdirectory [duplicate]

I have a Tomcat behind an Apache server and I would like to use the https request to be rewritten to the Tomcat on port 9001 with a hidden subfolder /test. hosts entry: 127.0.0.1 local.domain.com ...
1
vote
1answer
15 views

URL rewriting a specific directory

I want to rewrite the URL when receiving a request that is not a file and either for directory subdir or not a directory at all. E.g. (!file) && ( (subdir ) | ( !directory ) ) Here's my ...
2
votes
1answer
68 views

apache mod_rewrite variable hostnames with one redirect?

I have a test server (webtest.example.com) and a live server (www.example.com). I also have example.org, example.net, etc. I want those to redirect to example.com. I also want any non-www entries to ...
-1
votes
1answer
21 views

Domain keeps getting rewritten without mod_rewrite enabled

So essentially when I go to http://www.example.com OR http://example.com the URL gets rewritten to just www.example.com OR example.com dropping/removing the http:// part. I'm not sure why this is ...
0
votes
1answer
77 views

mod_rewrite in .htaccess and basic auth in vhost - access to paths

I want to lock down a website (made on Drupal) with basic auth. Drupal is using mod_rewrite in its .htaccess file. The problem I'm facing is this - my virtual host looks like this: <VirtualHost ...
1
vote
0answers
10 views

.htaccess redirect keeping url when there is wordpress code involved [duplicate]

I have two domains, alfa.com and beta.com. Beta.com points to alfa.com subdirectory named "ae" by following htaccess-file. It works fine, but what should I add to code to keep beta.com URL and not ...
-1
votes
1answer
37 views

How to set up htaccess to transfer from http to https? [duplicate]

This is my .htaccess - site does redirect to HTTPS but still gives: Your connection to the site is encrypted, but Google Chrome has detected mixed content on the page. How to avoid this? Thank you. ...
0
votes
0answers
36 views

How to rewrite request for subdirectories using apaches' mod_rewrite?

My document_root is /home/john/public_html. I need the URL example.com/subdir/index.php to be handled by the file /home/john/public_html/index.php. This is what I put in ...
0
votes
0answers
25 views

Apache config for AllowOverride All in .conf file in conf.d not working

I have setup an Amazon EC2 LAMP server running Apache v2.2.29. I've loaded mod_rewrite and am trying to modify the entry to AllowOverride All. Rather than edit the httpd.conf file in the ...
0
votes
1answer
159 views

Arch-linux apache 404 mod_rewrite VirtualHost with url suffix

I have a problem with Apache on Arch-Linux. I assume it is related to mod_rewrite, but I am not sure. In the past I always worked with Debian-based systems. Arch seems a little different. I have a ...
1
vote
0answers
54 views

Convertion of htaccess rewrite rule to nginx [closed]

Through searching the internet with "converting htaccess to nginx rule" I came up with anilcetin and winginx .htaccess to nginx converter which I doubt it doesn't correctly output what I need. Which ...