URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
38 views

Apache 2.4 + mod_rewrite + FastCGI (php-cgi.exe) on Windows

I am trying to port my Mac config on Windows for some of my clients. Since Windows is not Mac OS, I have to use php-cgi.exe instead of PHP-FPM. I have tested each component individually and ...
-1
votes
1answer
16 views

Mod_Rewrite Laravel Folder

Ok I'm pulling my hair out, can't get the mod_rewrite rules to work. This is my apache config <VirtualHost x.x.x.x:80> DocumentRoot "/web/domain1/" ServerName www.example.com ServerAlias ...
0
votes
1answer
30 views

redirect string to different url in nginx

I want to redirect a string to different URL in nginx. This what my vhost looks like and is working fine. server { listen 80; server_name secure.example.com; root /opt/tomcat/webapps/test/; ...
0
votes
1answer
49 views

apache - query string rewrite rule adds percentage symbol

I've set up a rule to rewrite a query string. Although the redirection is correctly performed, a % character is appended to the rewritten query portion of the URL, like so: ...
0
votes
1answer
22 views

Apache rewrite using THE_REQUEST for rewriting GET requests only

Background: In order to reduce repo size of git repos containing wordpress installs, we are removing static assets from the repo. The bulk of the work is done, but I have a snag. I've relocated the ...
0
votes
1answer
20 views

Configuring subdirectory with apache2 and HTTPS

I have a domain my.domain.com that points to a Zend Framework 2 application at /path/to/project/public which has a .htaccess and index.php file which handles all requests. At ...
0
votes
1answer
31 views

How can I rewrite from /page to /xx/page, using htaccess & apache only?

Hi I have found many resources on mod-rewrite and Apache but I haven't been successful of making a working example. The example below works for ✓ WORKS example.com/en/page1.php ☞ ...
0
votes
1answer
20 views

mod_alias.c rule to redirect all subdirectories

A mod_alias newbie here. I found the rewrite rule below somewhere and have been using it to block bots and hackers that hit my site, looking for directories like HNAP1, wp, blog, etc. And it works ...
0
votes
0answers
21 views

Apache Redirect rule with same url

I am trying to write a RewriteCond and RewriteRule to the following. If someone tries to access forex.com or forexample.com they should both redirect to forexample.com/abcd/xyz/. The below rewrite ...
0
votes
1answer
21 views

Redirect Alternative Domain Names for a Web Site While Maintaining Request Integrity

We bought some domain names that are similar to the primary domain name for our Web Site. All of these alternative domain names are associated with a single VirtualHost of which I can edit the single ...
0
votes
0answers
13 views

Handling spaces in SCRIPT_FILENAME with mod_rewrite

I'm having trouble using a reverse proxy when my URL has a space in the script name. For example: http://test.com/exam/good%20job.html?success=1 Gets rewritten and sent to: ...
0
votes
1answer
36 views

Pretty permalinks not working Apache, Wordpress, Mod rewrite

I'm trying to change the permalinks in Wordpress, so the URL uses the post-names instead. I've tried to modify the httpd.conf directly as below but Apache doesn't seem to be parsing the URL. I keep ...
1
vote
1answer
36 views

ModRewrite combine sites to one

Hi I am having some issues configuring rewrites which have fairly complex requirements browsing (www.)A.com should => www.B.com browsing (www.)A.com/{anything}/blah/foo/yes should => ...
2
votes
5answers
155 views

Rewrite Rule: appending a path to URL

Update Thanks for all the replies so far. I'd like to make clear that the number after user (e.g. user1) in my example is not significant. The user can be any alphanumeric name. I want to make ...
1
vote
2answers
30 views

mod_rewrite mysteriously appends subfolder to rewritten url

EDIT: [Solved] Finally found the solution in the documentation; posted an answer. In short: the DPI flag. EDIT: at the bottom, added an easy way to reproduce the problem online. I've spent a few ...
1
vote
2answers
31 views

Apache mod_rewrite: domain -> www.domain with wildcard SSL

I have an Apache 2.2 server and a wildcard SSL certificate for *.domain.com and have set up a mod_rewrite ruleset for both 80 and 443 that will properly redirect requests for domain.com to ...
0
votes
0answers
20 views

Rewrite/configure WebSVN location with MultiViews

I have configured mod_dav_svn 1.8.9 on FreeBSD along with WebSVN 2.3.3 this way: <Location /repos/svn> DAV svn SVNParentPath /usr/local/svn/repos SVNListParentPath On ...
0
votes
0answers
19 views

DirectoryIndex not working properly for rewritten URL

I have domain.com and sub.domain.com pointing to the same server and I'm using mod_rewrite to rewrite URLs for sub.domain.com to the sub subdirectory. I have the following .htaccess file in the ...
0
votes
2answers
31 views

Mod Rewrite based on HTTP_HOST don't change browser address

I am not exactly clear on why this isn't working properly. I have sub.domain.com with its contents in /sub_folder, and sub.domain.com is listed in the ServerAlias directive for domain.com. The DNS ...
3
votes
2answers
94 views

Mass virtual hosting with Apache 2.4

I would like to use the value set by VirtualDocumentRoot in a RewriteRule. The Apache documentation says: The other thing to determine is the document root (configured with DocumentRoot and ...
0
votes
1answer
25 views

htaccess rule for url not ending with certain words

I need to rewrite few urls if those url not ending with certain words. For example, i need to rewrite following url /category1/subcategory1/aproduct-url-title to ...
0
votes
0answers
7 views

How to get log of the addres that mod_rewrite is redirecting to?

I have defined a rewrite rule that is creating an 404. But I can't find any additional information about where the Apache is really looking for the file so it can't find it and also I don't see ...
0
votes
0answers
28 views

Redirecting domain to subfolder of other domain [duplicate]

I'm fairly new to this, so excuse me if this is a stupid question. My hosting party allows to only link one domain directly to a hosting package. Today I bought a new domain and I'm trying to link it ...
0
votes
1answer
17 views

mod_rewrite Unmatch of .php and Also Slash

I'm trying to write a set of rewrite rules that will send all requests for static assets to our CDN while keeping requests for PHP files local to the server. I have one rule that works for "match ...
0
votes
1answer
40 views

Redirect domain/directory to domain2/directory

I would like domain1.com/customers to go to domain2 my home directory public html's folder / customers. Both domains are on different servers. In the folder on the second server/second domain we will ...
0
votes
0answers
53 views

Apache rewriting sub domain URL with www prefix

My website is rewriting all subdomain links with www. for example news.example.com works fine, but if I go to news.example.com/wp-admin it will rewrite the URL to www.example.com/wp-admin ...
0
votes
2answers
40 views

Subdomain-to-folder redirect (HTTPS)

I have the following in my httpd.conf at the very bottom. No other configuration is done. NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin webmaster@contoso.com ServerName ...
1
vote
2answers
42 views

Lighttpd rewrite subdomains to subfolders

I have a server (itself on a subdomain) with wildcard DNS pointing to it. The server is running Lighttpd and PHP. I need requests to http://any-subdomain.server.example.com to rewrite to ...
0
votes
1answer
28 views

Masking external domain with Apache2 [closed]

Let say, that you own domain www.example.com and have another project on another domain on server that you do not have control: www.sub.notmine.example.org. And you want an user do navigate to ...
0
votes
1answer
31 views

rewrite rule does not rewrite url as expected

I have a problem with a CMS website, that normally generates readable urls. Sometimes it happens that navigation links are shown as www.domain.com/22, which results in an error, instead of ...
-2
votes
1answer
69 views

How to redirect using Apache [closed]

I am working on moving an IIS server website onto an AWS Load balancer. I am trying to figure out how to Manipulate a web link in Apache. My team and I are currently using IIRF to redirect the link in ...
0
votes
2answers
65 views

A RewriteRule for all VirtualHosts on Ubuntu 14.04?

After a2enmod rewrite, I wrote the file /etc/apache2/conf-available/myspecific_rewrite.conf : RewriteEngine on RewriteRule ^/test(/.*)?$ http://anothersite.tld/test$1 [R] RewriteRule ^/test2(/.*)?$ ...
1
vote
2answers
60 views

Apache httpd mod_rewrite with Tomcat resulting in lost JSESSIONID

So I'm working on a Java web application, for which I recently implemented an authentication module that relies on the JSESSIONID cookie to identify users. I was testing on a local tomcat from eclipse ...
0
votes
0answers
11 views

htaccess negation rule not being followed

I'm working on a wordpress blog. The .htaccess file for it includes this block: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond ...
0
votes
0answers
20 views

redirect robots.txt to alternative apache mod rewrite [duplicate]

I'm having trouble trying to get an alternative robots.txt to display for different host names so that Google or Bing won't spider different addresses. Here's what I have so far #temporary dev rule ...
0
votes
1answer
41 views

redirect landing without changing url

I'm working with Apache and Joomla. I would like to have some URIs that land to the same landing page, but avoiding the URL changes. So, for example: examplecom/luggage/delay/iberia ...
0
votes
0answers
14 views

ProxyPassReverse from unique path and HTTP_HOST

This is probably super simple and something I overlooked (or totally misunderstand). Trying to redirect all incoming traffic for a certain path to one of my other servers (I put the wrong environment ...
0
votes
0answers
32 views

Changing the current URL but serving content from another (same domain) - ProxyPass?

I've been banging my head against the wall with this for months now so I hope someone on here will be able to finally advise what is needed for this. I have some URL's like this:- ...
0
votes
1answer
18 views

Apache Windows MOD_REWRITE &

One of our clients is using Apache 2.2 as a reverse proxy server (Yes, stupid of them) and we're seeing some very funky behavior when trying to redirect some URLs and I'm curious if anyone has seen ...
0
votes
0answers
45 views

Rewrite rule Mod_Proxy truncate file name

I search online for the solution, but nothing :(. I write this simple rule RewriteRule ^(.*)$ http://www.mysite.com/$1 [P,NE,QSA,L] In mysite.it i have an .htaccess with this rule and it's ok, but ...
1
vote
3answers
56 views

mod_rewrite all but two files causing loop

I'm trying to set up a web site to allow the creation of a semaphore file to close the site. The logic I want to follow is: when the semaphore file exists and the request is not for /style.css or ...
0
votes
0answers
83 views

Reverse proxy 502 bad gateway

I have setup a subdomain to proxy my plesk panel, but when saving pages I am getting 502 Bad Gateway error instead of a completion message. I am running CentOS 6. Here is my vhost.conf configuration ...
0
votes
0answers
16 views

How to write an apache rewrite rule from /?param=1&param=2 to /index.php?param=1&param=2 [duplicate]

I am trying to figure that out but my regex experience is non-existent and apache rewrite rule is intimidating. Can anyone shed a light?
0
votes
0answers
42 views

apache2 on cloud 9 : could not read /etc/apache2/envvars

I'm trying to get a Laravel app up in the new cloud9 beta, and hopefully the last step I need is to get mod rewrite working. I looked up how to do it and so I've been trying: sudo a2enmod rewrite ...
0
votes
1answer
39 views

VirtualHost Redirect should work with new RewriteBase

Inside the VirtualHost I got this redirect: RewriteBase / RewriteCond %{REQUEST_URI} wp-content/uploads/([^.]+\.(jpe?g|gif|bmp|png))$ RewriteRule (.*) http://example.org/$1 [R=301,L,NC] So the full ...
0
votes
0answers
30 views

WAMP, Vhosts and mod_rewrite not all playing nicely together

I have a client using a Windows 2012 server with WAMP installed. We use PHP 5.4 with mod_rewrite for SEO friendly URLs. All was working well with them until we tried to enable vhosts to set up a ...
0
votes
1answer
57 views

Apache mod_rewrite redirecting to base URL

I'm busy migrating a production codeigniter project to a new server. The current setup has been working fine for almost a year now but while moving to the new LAMP stack I'm running into a weird ...
0
votes
2answers
80 views

Mod_Rewrite Error code: ERR_TOO_MANY_REDIRECTS

I know alot people have post about this error , however i still unable to solve it.So that is the reason why i start a new post with it. As stated in the title , i encounter a redirect loop when ...
0
votes
1answer
27 views

RewriteRule Not Rewriting URL properly [duplicate]

I have the following virtual host file: <IfModule !wsgi_module> LoadModule wsgi_module modules/mod_wsgi.so WSGISocketPrefix run/wsgi </IfModule> <VirtualHost *:80> ...
0
votes
0answers
55 views

apache reverse proxy 404 image error

I have some error with my apache reverse proxy. Currently I am doing reverse proxy to 4 websites. 1.1.1.1/a 1.1.1.2/b 1.1.1.3/c 1.1.1.4/d I am having no problem when reverse proxy to a and b ...