0
votes
1answer
15 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: ...
0
votes
2answers
18 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: ...
-2
votes
1answer
34 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]
0
votes
1answer
28 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
55 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
48 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 ☞ ...
1
vote
1answer
37 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
205 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 ...
0
votes
0answers
31 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
95 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
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
53 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
68 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 ...
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
1answer
34 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> ...
1
vote
2answers
70 views

Apache2 and rewritemap - hours of trying

I stuck with rewritemap problem. What I want to do is redirect thousands of old nearly random urls to new ones. I will build map manually, but I need this code to work. RewriteCond ...
1
vote
1answer
65 views

apache change proxy request url rewrite

I have problem with proxy requests. I need to enable apache mod_proxy for my subdomains but i forgot to set Allow from mydomain.com, it was Allow from all...Yes, i created open proxy for all world... ...
0
votes
1answer
64 views

MOD_REWRITE for rewriting GET requests [duplicate]

I need a .htaccess expression to use the second get variable or get the get variable by name. Currently my mod_rewrite alters the URL to remove index.php filename and alter the pageName GET variable ...
0
votes
1answer
59 views

301 permanent redirection changing URL structure [duplicate]

I changed category urls on site. Old are like this: www.example-name.com/category-name-exactly-same-keywords/ ...
0
votes
1answer
49 views

Rewrite rule custom 301 redirection

I have link like this: www.example.com/full-image/folder/subfolder/image-name.jpg-some-custom-keywords.html and I need 301 redirection to url like this: ...
0
votes
1answer
479 views

nginx url rewrite rule

I'm doing a migration from a WordPress blog to a Jekyll Blog using NGINX as my HTTP server and I don't want to break the Internet by leaving some URL's not working as expected. I got to a point where ...
1
vote
2answers
63 views

How to use mod_rewrite to abstract get request with subdomains

I've been at this all day and I thought I had a handle on regular expressions but I'm no longer confident that I do. I've searched all over, read through some horrible guides on mod_rewrite and I'm ...
3
votes
1answer
57 views

Multiple rule Apache rewrite

I am trying to set up a hierarchy five levels deep with mod_rewrite. This is what I have put together at this point. It works for the last two levels (the first and second rule) but not after that. ...
0
votes
1answer
57 views

Apache2: Trying to map a subdomain to a subdirectory

So basically I want to have: sub.domain.com/anything -> domain.com/asub/anything I'm a bit new to this and a bit confused. The first thing I did was configure my DNS settings so sub.domain.com goes ...
0
votes
3answers
1k views

Apache > 2.2.22 rewrite rule not working?

since yesterday I'm trying to figure out how to fix the following: running phpipam (http://www.phpipam.net/) with WAMP (Windows environment). The problem I am facing is related with RewriteRule ...
0
votes
1answer
110 views

Server remembering old rewrite rules, even when I remove htaccess

I have set up a development server with Ubuntu and LAMP, but for some reason the .htaccess is acting strange... There is a site on there with a set of rules, when I comment them out they still work, ...
0
votes
0answers
50 views

Apache Rewrite Rule that Updates Query String Case

I have been looking far and wide for help with this but am not able to get a Query String-based rewrite to work. I want saas.site.com/shop-accesories.html to redirect to ...
-1
votes
1answer
82 views

Nginx redirect sub.domain.com/users/page/somename to somename.sub.domain.com

I've been trying to redirect http://sub.domain.com/users/page/somename to http://somename.sub.domain.com etc. Any pointers?
0
votes
1answer
667 views

RewriteBase rule works in .htacess, but not in httpd.conf (inside <Directory …>)?

Let me explain by example... File: /var/www/example.com/public/wp-content/cache/minify/.htaccess <IfModule mod_rewrite.c> # THIS WORKS... RewriteBase /wp-content/cache/minify/ ...
0
votes
0answers
63 views

How do you exlcude a sub-directory from an Apache rewrite ruleset?

I have a multilingual site with the root being English and a sub-directory (/es/) being a human translation into Spanish. Instead of manually updating all URLs, I have a opted to use mod_rewrite to ...
3
votes
2answers
354 views

Apache configuration - rewrite rule for all virtual hosts

I have the following configuration with 2 virtual hosts on my Apache: www.domain.com and res.domain.com. The first one is open the second is limited to registred users. <VirtualHost *:80> ...
0
votes
2answers
3k views

Removing php extension with .htaccess does not work

I use the following code on my site elixnews.com to remove php extension from: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
2answers
130 views

How to simulate Apache [END] flag on a redirect?

For business-specific reasons I created the following rewrite rule for Apache 2.2.22 (mod_rewrite): RewriteRule /site/(\d+)/([^/]+)\.html /site/$2/$1 [R=301,L] Which if given an URL like: ...
0
votes
2answers
692 views

Server, Database or Code Issue? Magento backend rewrites itself with a index.php which doesnt work

I will be honest and admit my cross posting in magento.stackexchange.com but the reason is that I believe it is a server fault, and now I am looking for proof to present to my dreaded hosting ...
0
votes
0answers
139 views

Is there a way to get a password from HTTP authorization header in mod_rewrite (apache2)

I'd like to parse HTTP authorization header in mod_rewrite - to be able to use login and password for another redirect. I want to achieve something like this: user puts ...
-2
votes
1answer
23 views

How do I get apache 2 to serve up home directory? [closed]

I have a domain name I have registered and it is currently showing the Apache 2 Test Page from the /var/www/html/ directory, I was wondering how I can get it to point to a home directory instead ie: ...
0
votes
2answers
51 views

RewriteRules not stopping with [L] flag?

A simpel mod rewrite in .htaccess. If I open for example /lib/js/core/jquery.min.js, Apache2 takes the last rule and not the first. How can I fix this? RewriteEngine on RewriteRule ...
0
votes
2answers
72 views

.htaccess - complicated conditions

I've been trying to wrap my head around .htaccess for most of the weekend, but I keep stumbling; I can get the server to work with one set of rules, but no more than one at a time. My application is ...
0
votes
2answers
48 views

Advice on mod_rewrite url in Apache

I'm trying to set up a mod_rewrite rule so that when the webpage www.mysite.com/blog is requested a page from the blogging service Tumblr is loaded. I have set up my Tumblr site so that ...
0
votes
1answer
60 views

Converting .htaccess to nginx

RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) p.php?id=$1 [L,QSA] How would I change that to work with nginx? Also, where do I place ...
0
votes
3answers
3k views

How do I make RewriteCond %{HTTP_COOKIE} match a cookie value exactly? [duplicate]

How do I make my rule match an exact value of a cookie? I've tried: RewriteCond %{HTTP_COOKIE} ^its=me$ [NC] RewriteCond %{HTTP_COOKIE} its=^me$ [NC] RewriteCond %{HTTP_COOKIE} its="me" [NC] ...
0
votes
1answer
147 views

apache rewriterule for querystring parameters

The code below builds a url in this form. http://mysite.com/browse/department/?pid=1 and here is the rewrite cond and rule RewriteCond %{QUERY_STRING} ^pid=([0-9]+) RewriteRule browse/(.*)/$ ...
0
votes
1answer
261 views

apache simple rewrite rule or rewrite condition for query string

Im trying to add a rewrite rule to my htcaccess file and the part Im having trouble wth is the query string. I want to add the query string parameter pid to the rewrite rule. Both lines of code don't ...
0
votes
1answer
279 views

how to make a url rewrite rule exception?

I have a bunch of rewrite rules to redirect visits from domainX to domainY, however now I want show an index.html page when people visit domainX, but I still want all the other rewrite rules to apply. ...
0
votes
1answer
55 views

apache rewrite syntax

Trying to block Google bot and others from accessing some of my sites. Thing is I have one box that has a ton of virtual host files that do nothing more than do a proxy pass to other servers. I would ...
0
votes
2answers
113 views

Apache2: URL rewriting not working

I am having trouble getting URL rewriting to work. I have tried everything I can think of. I have checked all possible places where AllowOverride is set to None and changed it to All. mod_rewrite is ...
0
votes
2answers
28 views

Redirect url's using RewriteRule

I had a site, say example.com/drupal running on xampp I have since changed the DocumentRoot in httpd.conf to /drupal/, so that I could access my site using example.com But Google has already crawled ...
1
vote
0answers
161 views

Lighttpd and OpenCart GET requests with mod_rewrite

Our OpenCart is running on Lighttpd and we use mod_rewrite for SEO. Whenever we have our rewrite rules on, GET requests such as http://www.site.com/dev/?gclid=XXX do not work. Here are my current ...
0
votes
1answer
108 views

Apache internal redirect limit reached

I have following problem: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel ...
0
votes
1answer
89 views

Fixing mod_rewrite rule in Apache to apply only to one domain

I currently have <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ ^ezrahub.com/index.php/$1 [QSA,L] </IfModule> Which is ...