0
votes
2answers
22 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
42 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
36 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
32 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
2answers
45 views

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

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
31 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
48 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
110 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
30 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
65 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
22 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
69 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
47 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
38 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 ...
3
votes
2answers
126 views

How do I set up URL Rewriting to a Heroku instance?

I'm more of an engineer than a devops guy, so please excuse me if this is extremely basic. My situation: I have a server on the example.edu network, so I don't control the main DNS interface to ...
0
votes
1answer
33 views

apache rewrite debian vs windows

I have simple rewrite rules as I just learned about them RewriteEngine On RewriteRule ^dl/(.*)/.*$ dl/$1/index.php [L] RewriteRule ^index.php$ upload.js [L] both are working on Windows for url ...
0
votes
1answer
111 views

nginx: rewrite a non-existent php-file to another php-file with all arguments

i really need help here. Sitting for some time now and dont figured it out. I want to realize a very simple task - rewrite a non-existent php file to another existant php file with all arguments ...
0
votes
1answer
150 views

Redirect non-existent subdomain to base domain url

I was using Droplr with my domain, 'example.com', prepended with 'u.'. (u.example.com). The prepend was not a subdomain, and would redirect to Droplr via an A record to their server's IP Address. ...
0
votes
0answers
169 views

HTACCESS Request exceeded the limit of 10 internal redirects due to probable configuration error

There are similar questions being asked about the same thing, but this has all of a sudden happened to me. No code was changed, just woke up to find apache using up way too much memory. The error I'm ...
1
vote
1answer
52 views

how to make this htacess rewrite rule stop failing because of final parameter

I have this URL rewrite rule RewriteRule ^(send-your-request.*)$ / [NC,L,QSA,R=301] it should basically just remove "/send-your-request" from the the URL (i.e. rewrite it with query string ...
0
votes
1answer
92 views

Rewrite the Base URL with mod_rewrite

My Domain example.com points to the directory public_html. In the directory public_html/php is my index.php file. Now I want that the URL example.com points to *public_html/php/index.php*. I must do ...
0
votes
1answer
73 views

How to redirect ServerAlias - requests to ServerName and obey the subdirectories in the requests?

I want redirect all traffic to example.com/* to be redirected to www.example.com/* I found How can I redirect any ServerAlias to the respective ServerName? which handles the topic in question and did ...
0
votes
2answers
167 views

Issues with Apache redirect to www-prefixed URL

I have a website with domain mysite.com. I would like to have it so that if a user types in "mysite.com" it will redirect to "www.mysite.com". Additionally, "mysite.com/subdir" will also redirect to ...
0
votes
1answer
102 views

Apache RewriteRule causes 500 error

I am trying to make use of an image processing app. It requires an Apache directive in a .htaccess file. But no matter what I do to the RewriteRule, I cannot getting it to work. Causes a Server 500 ...
0
votes
1answer
76 views

Apache URL rewriting

Say I have content in www.domain.com/products/ In the products folder, I have several html files all starting with "big-". For example: big-product01.html big-product02.html How can I rewrite my ...
2
votes
4answers
52 views

Forcing SSL with mod_rewrite

I have the following statement and it works perfectly to redirect all requests for "www" on :80 to force the browser to the same location on :443 RewriteEngine on RewriteCond %{HTTPS} !=on ...
1
vote
1answer
14 views

mod_rewrite for selectors with .html

We have a website where the URL looks something like, www.example.com/about.smart.html ( "smart" being selector added on the app server based on the useragent if its a smart phone device) We need ...
0
votes
1answer
41 views

Apache .shared folder

There are already a bunch of rules in my Apache configuration. What I want to add is the following. There are some shared folders (.shared): /var/www/.shared/ and /var/www/.include/.shared/ and ...
0
votes
2answers
158 views

Apache mod_rewrite redirect with prefix

I am newbie with Apache's mod_rewrite and I'm having some difficulties getting it to do what I want. In my static directory, I have some javascript files (.js) with 2 kind of filename: xxxx.js ...
0
votes
0answers
24 views

Enable users to run custom-url instead of application-url using mod_rewrite or vhost on apache?

I'm running a system which users can skin/style according to their preferences. I also want to enable users to use their custom-URL and am struggling to set this up correclty. I have set up the ...
0
votes
1answer
54 views

mod_rewrite to a folder except for a set of domains

Could anyone help to with the following issue: I'm trying to do a rewrite on all domains that won't match and push them to a given folder. The following vhost works locally (Mac OS X with XAMPP), but ...
1
vote
1answer
103 views

Apache rewrite redirect to https and www

I need to get mod_rewrite to do the following http://abc.com -> https://www.abc.com https://abc.com/login -> https://www.abc.com/login http://www.abc.com?x=3 -> https://www.abc.com?x=3 ...
0
votes
0answers
30 views

Apache - Recursion rerouting

Ok, this is some recursive thing, and I don't know how to do this in Apache. I want this: I have some folders, let say test.web.com, website. Now this is what should happen: 1) When visiting ...
-1
votes
1answer
171 views

Combine WordPress and Subdomain rewrite rules for the server 'Zeus' [closed]

Currently, i have working with a Zeus server and we have a website which is developed using Wordpress. Zeus Sever don't support the .htaccess file which is required to install wordpress and also for ...
1
vote
1answer
272 views

apache rewrite to root without change or url

the WordPress rewrite rules are like this: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . ...
0
votes
1answer
394 views

Configuring httpd.conf to handle wildcard domains with *multiple* scripts

I have a full-blown site like: http://www.example.com (uses index.php) http://www.example.com/scriptA.php http://www.example.com/scriptB.php I now want to have the possibility of setting up ...
0
votes
0answers
88 views

lighttpd rewrite causing infinite loop

I am having an issue getting a specific rewrite requirement working on lighttpd/mod_rewrite. We have a folder that is called "/app/" with another folder inside that "/app/admin/" "/app/index.php" is ...
2
votes
7answers
2k views

Excluding a directory from a root .htaccess rewrite rule to allow it to be password protected?

I have spent a tremendous amount of time the last week trying to figure this out, but no matter what I try I cannot get this to work. My web host said they did not have anyone who knew enough about ...
0
votes
1answer
62 views

Reg Expression htaccess RewriteRule

I am new to using regular expressions for rewriting URL's in htaccess I need to redirect mysite.com/123 to mysite.com/, IF cookie named 'ref' is set. my current htaccess is: <IfModule ...
3
votes
1answer
208 views

Is it possible to rewrite some query strings to HTTPS and keep everything else on HTTP?

I'm rewriting query strings to pretty URIs, example: index.php?q=/en/contact becomes /en/contact and all works nicely.. # httpd.conf # HANDLE THE QUERY RewriteCond %{REQUEST_FILENAME} !-f ...
0
votes
1answer
55 views

.htaccess rewrite issue

Below is my .htaccess file for my website on shared hosting - I'm attempting to send all requests to index.php with parameter 'q' where I wish to parse data etc... unless it's an existing file or ...
1
vote
1answer
90 views

How to rewrite these URLs?

I am brand new to URL rewriting. I am using an Apache rewriting module on IIS 7.5 (I think). Either way, I am able to do rewrites successfully, but am having trouble on a few key things. I want this ...
1
vote
0answers
37 views

apache url rewrite not working as expected

looks as if it's working now, i'm not doing anything... stange... I want to write http://www.1024jobs.net/jobs/view/17.jhtml to http://www.1024jobs.com/jobs/view/17.jhtml so i have tried either of ...
0
votes
3answers
387 views

Using mod_rewrite to hide tomcat port

I have apps on Tomcat that use URLs like this: http://xxx:8080/myapp I don't want the users to see the port in the URL. Hi can do a rewrite rule like this: RewriteRule ^/myapp(.*) ...
0
votes
0answers
100 views

Remote web in localhost: htaccess redirections

I have a web working in a remote server: www.example.com and I'm copying it to my localhost, Apache is installed on port 8082 so my local adress would be localhost:8082/example.com/. This is what the ...
0
votes
1answer
140 views

nginx rewrite rules for cached images

we are currently migratiing all services from apache2 to nginx but are currently stuck with a specific rewrite rule. The rule in apache is checking if a cached image/thumbnail exists and if so, ...
1
vote
3answers
158 views

Apache mod_rewrite, multiple variables

I'm struggling a bit with mod_rewrite and replacing multiple variables with regexes. I'm trying to rewrite the following: www.mysite.com/avatars/funny/1 into: ...
2
votes
3answers
567 views

mod_rewrite, clean URLs, and page content directories

I am using mod_rewrite in an .htaccess file in our root web directory so that we can use cleaner URLs for some specific cases. For example, we want to translate: ...
0
votes
0answers
95 views

RewriteMap and RewriteRule troubleshooting on Apache2

First off, I'm trying to get the following rule working: RewriteMap legacyredirect txt:/var/www/path/to/legacyredirect.txt RewriteRule ...
0
votes
1answer
58 views

mod_rewrite adds .html when redirecting

I have a redirect situation where the site is part dynamic and part generated .html files. For example, mysite.com/homepage and mysite.com/products/42 are actually static html files Whereas other ...

1 2 3 4