URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
9 views

Apache rewrite to tidy up image urls [duplicate]

I am using the htaccess file that ships with the skeleton application for Zend Framework 2. Here it is: Options -Indexes RewriteEngine On # The following rule tells Apache that if the requested ...
1
vote
1answer
18 views

mod_rewrite activated but error logs

The mod_rewrite is running on my system but I still have an error at the apache2 error_logs. me@server:# ls /etc/apache2/mods-enabled | grep rewrite rewrite.load Content of rewrite.load LoadModule ...
0
votes
0answers
21 views

htaccess redirect loop only on one of two servers

I have a web app installed on two servers. On one of the servers, when I'm accessing the homepage I get the "Error code: ERR_TOO_MANY_REDIRECTS" error in the browser while on the other one everything ...
0
votes
1answer
21 views

Having issues with inconsistent application of mod_rewrite rules

So I've been asked to clean up the URL's for the web app that we're currently running on apache (version 2.4.9 if so interested), but after messing around with mod re_write commands for a few hours, I ...
1
vote
1answer
14 views

httpd forward traffic from a url to another machine on same lan virtual host

I'm running HTTPD on a CentOs 6 server. I have 2 servers on the same LAN as eachother. I only have 1 IP address. I have 2 domains pointing at the router and I want example1.com handled by server 1 ...
1
vote
0answers
7 views

apache2.2: ldap_userdir + mod-rewrite does not work properly

My apache config: DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory ...
0
votes
0answers
11 views

https apache2 rewrite rule returns loop page

I have a rewrite rule that should redirect (http) membership.newref.php to (https) example/membership.newref.php Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ...
-1
votes
1answer
13 views

Godaddy .htaccess and mod_url

I'm an experienced full stack developer and freshly minted webmaster. Recently my client asked me to create a redirect from one url to an outside page. I know how to make a page redirect and I'm ...
1
vote
1answer
13 views

ProxyPassMatch and mod_rewrite order of operation

I've got a situation with Apache 2.4, PHP-FPM and Wordpress Multi user in sub folder mode. All non *.php files work fine in the subfolder, as does the main example.com/subblog/ url, however anything ...
0
votes
1answer
74 views

How To Force Rewrite and Redirect Url [duplicate]

I have a url: http://domain.com/i.php?c=PT and I Rewrote it to http://domain.com/PT successfully. But When I browse http://domain.com/i.php?c=PT, it wont redirect to http://domain.com/PT. Is there ...
0
votes
1answer
37 views

ProxyHTMLURLMap not working in apache2.4

I am using apache2.4 on ubuntu 14.04. And I have enabled mod_proxy_html.But my URL are not getting replaced by a new one. Same thing I did in apache2.2 and it was working perfectly. This is my ...
1
vote
1answer
19 views

Unable to combine RewriteRule and Header set [duplicate]

Trying to implement the following: RewriteRule \.ttf$ - [E=cors:1] Header set Access-Control-Allow-Origin "*.example.com" env=cors:1 Header set Access-Control-Allow-Origin "*.sadface.com" env=!cors:1 ...
0
votes
1answer
32 views

htaccess: get request domain for mobile redirect

We have a mobile site that is served using multiple domains. We want to redirect users who are using desktop user agents to our desktop sites while preserving the original domain the user used to ...
-1
votes
1answer
38 views

Redirect for https and www [duplicate]

I currently have my rewrite rules in the post_virtualhost_2.conf file this in inserted into the httpd.conf file at the absolute end. I have two blocks that don't seem to be working <IfModule ...
-1
votes
0answers
15 views

Apache Virtual Host Reverse Proxy rewriterule not rewriting everything [duplicate]

The server is being used as a reverse proxy, urls are points at the servers, the server intercepts the URLs and reverse proxies the pages from the IIS servers. The below rewrites some URLs but not ...
1
vote
0answers
29 views

Special nginx hotlink protection conversion from Apache .htaccess rule

I have the following anti-leeching rewrite rule in Apache, which i'd like to have in nginx. I see cookie or referrer rule examples. But none combining both, so I am not sure how to go about this. ...
0
votes
1answer
23 views

How do I transparently redirect only the root directory on a DreamHost.com shared server? [duplicate]

The following DreamHost wiki explains how to transparently redirect your root directory to a subdirectory.. http://wiki.dreamhost.com/Transparently_redirect_your_root_directory_to_a_subdirectory The ...
0
votes
1answer
29 views

How do you prevent mod_rewrite from decoding a string in the path? [duplicate]

I'm trying to create a restful API using mod_rewrite. I have the rule: RewriteRule v2/(.*)$ v1/index.php?request=$1 [QSA,NC,L] However the path could contain base64 encoded strings (i.e. can ...
-1
votes
0answers
18 views

.htaccess to redirect phone users to different photos folder not working?

I realize there are numerous similar questions. I have checked them and can't figure out where the problem is. I have a large directory of small-for-phones photos ("mobile") using the same ...
1
vote
0answers
25 views

Use custom environment properties from Elastic Beanstalk for htaccess

Is there a way to use the custom environment property of elastic beanstalk in htaccess? I only want to rewrite http to https when not running locally so I thought I could do this by using the ...
0
votes
1answer
36 views

mod_rewrite not acting as expected — missing path info

I've just installed a fresh apache (Apache/2.4.7 - Ubuntu) and created and enabled a site with a Document Root of /var/www/html. With mod_rewrite enabled, I proceeded to create a simple .htaccess file ...
-1
votes
1answer
25 views

symlink to PHP file not handled as PHP

I have PHP5 installed on an Ubuntu 14.04 server and it works fine. I create a file called foo.php anywhere in the document tree and it gets passed to the PHP interpreter just as you'd expect. ...
0
votes
1answer
47 views

mod_rewrite: strange infinit loop [duplicate]

I have a folder structure, like this: forum .htaccess [some more files] forum_english .htaccess [some more files] forum/.htaccess looks like this: RewriteEngine on RewriteCond %{HTTP_HOST} ...
0
votes
0answers
28 views

Apache HTTP to HTTPS Redirection on none HOST NAME

I'm not able to get a corect redirection from http to https on every url on my Apache on Centos. I got this in the httpd.conf: LoadModule rewrite_module modules/mod_rewrite.so NameVirtualHost *:80 ...
1
vote
1answer
35 views

Apache2.4 mod_rewrite won't redirect me to subdir based on visiting domain

I have an Apache2.4 server with public dir in /var/www/html. In that dir I have a Wordpress site with this .htaccess: RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f ...
1
vote
1answer
39 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
28 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
36 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 ...
1
vote
1answer
28 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
31 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
39 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
20 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
11 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
35 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
13 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
64 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
26 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
53 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
18 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 ...
0
votes
2answers
58 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
14 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
19 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
33 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
30 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
329 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
40 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
56 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
78 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
75 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 ( ...