A link from a website beyond my control links to an erroneous url. The erroneous url contains a hollow square character. How do I write a redirect 301 to deal with this occurance? When attempting to paste the character in the .htaccess file I get a question mark.
If I need more than a redirect 301, then what?
...
I have an jQuery application that works fine on a single-node web server, but breaks when I run it on a testing cluster server (Apache mod_proxy_balancer). The code is this:
$.get("/file/foo.xml", function(xml) {
alert(xml);
}
Clustering configuration is:
<Proxy balancer://mycluster>
BalancerMember http:// 10.32.4.37:90
B...
Hi all,
I'm building in some caching to one of my sites, and I can't seem to find if there's a way to add a condition with mod_rewrite to apply only if the query string on a request is empty.
For example, I'd love to know if I can have a request with no query string like
http://www.example.com/
load the page at
http://www.example...
I am deploying an app on Ubuntu 10 using Passenger 2.2.15, Rails 2.3.5, Ruby 1.8.7, and Apache 2.2.14. When I open http://localhost/appname it displays the contents of the app's root directory (/var/www/appname). Currently passenger and apache seem to be installed correctly, but this error persists.
/etc/apache2/sites-enabled/appname i...
I have the following list of URLs to rewrite:
1 write url
/products/client/
send to
/basedir/system/index.php?client=cliente
2 write url
/product/client/index.php
send to
/basedir/system/index.php?client=cliente
3 write url
/products/client/image/dir2/myimage.jpg
send to
/basedir/system/image/client/dir2/myimage.jpg
4 ...
Hello,
I know there are topics on this and I am aware of using Daemon processes with mod_wsgi, but I am running on a Windows computer and I don't believe WSGIDaemonProcess is therefore available. Is there any other way I can recompile Django without restarting Apache with mod_wsgi on a Windows computer?
If not that's fine but I ju...
I'm building an address book application. I'd like to allow users to click on a contact in my application, and be directed to their yahoo or gmail webmail, to the compose page, with the "to" field populated with data that I supply. Is this possible?
...
We're changing the way users embed images in their blogs, but I need to make sure previously embedded images are still displayed.
I'm trying to redirect legacy image embed links to either a static image or a single legacy image embed handling file. I'm using mod_rewrite, but it appears I fail. Amazingly, I've managed to cobble together ...
The Apache Ant javadoc target allows a <link> attribute to link to external javadocs. I would like these javadocs to open in a new window (like target="_blank"), but the link attribute doesn't accept a <target> attribute that would allow me to do something like this. Is there some other way to do this apart from manually editing the link...
This question is not nginx vs apache. I am more interested in the architectural advantages of NGinx over Apache. As I was able to understand -
nginx is an asynchronous, event-driven, web-server which outperforms Apache by a huge margin.
Why is this? Where does Apache fall behind?
...
Hello,
I am using the readfile function to read image files. It works in most cases except when an image is located in a directory with htaccess file.
Here is an example:
header("Content-type: image/jpeg");
ob_clean(); // clean output buffer
flush(); // flush output buffer
readfile("http://127.0.0.1/WebProjects/project1/data/media/im...
Hi,
I would like to decode requested URL via .htaccess/mod_rewrite and forward it to my PHP application. I am making request to some remote service and I need to preserve the URL for redirecting after processing the remote request. I am handling it over in forward GET parameter so I need to encode it via urlencode. I would like it decode...
Hello.
I need help with url-rewriting in .htaccess.
So the issue is about different protocols: https and http. The main purpose of rewriting is to remove "www" from URL, but protocol should stay the same it was before.
For example, when I have URL like http://www.domain.com/request, it should be redirected to the http://domain.com/req...
I want to map subdomains to my wordpress tags.
So when a user visits mytag.myblog.com, he should see the page myblog.com/tag/mytag (without redirect, though).
This will require some modification of the wordpress code and setting up "catch all subdomains" for the domain in apache. The latter part should be no problem.
I found a plugin th...
PHP creates files with apache:apache ownership which seems to be causing issues with other php scripts accessing the file.
How can I allow php to create files with the same ownership as the files that created them?
I've read elsewhere that having safe_mode turned on can affect this but I've turned it off and reuploaded the files and i ...
I have a few Cron jobs running using 'wget' on my server, none of which are storing errors/results to a log file. Each of the command lines is identical except the specific controller and function called. I'm having trouble with one of the cron jobs, even though if I navigate to it in the browser it works without a hitch; the other two...
I want to create user directories in an Apache server that are also accessible via the FileZilla FTP server. How do I create these directives and most importantly how do I apply them to Apache?
...
I'm trying to replicate a web-site on a test-server. However, on the test-server, .php files don't get interpreted. I found that the cause is a .htaccess file in the document root. Its contents:
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
RewriteEngine On
#RewriteRule ^$ index.php [QSA]
RewriteRule ^(....
Hello,
I have a problem with a question mark in url. For example I have url "test.com/controller/action/part_1%3Fpart_2" (where %3F is url encoded question mark). With this rewrite rule "RewriteRule .* index.php/$0 [PT]" it should be passed to framework I use (Kohana) as is. At least I thought so. The problem is that everything after th...
I have the following mod_rewrite:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^register index.php?page=register
The url looks like this: http://domain.com/register?param=foo&paramtwo=bar
If I now print $_GET in PHP I get this: Array ( [page] => register ) but the other params aren't set. Must I change someting at the mod...