apache tomcat

Renaming public_html folder

I have recently renamed my old public_html folder and created a new public_html folder. Post that I am facing the following issue: Forbidden You don’t have permission to access / on this server. Server unable to read .htaccess file, denying access to be safe I have done some research but nothing has helped so far. I have changes the permissions…
Read more

apache: rewrite js remove timestamp

well, i would like to rewrites js: /resources/js/general.js/1234/ -> /resources/js/general.js due to akamai’s cache i can’t use regular querystring: ?t=1234 static works: RewriteRule ^(.*).js/[0-9]+/$ /resources/js/general.js [NC,L] but i can’t build a dynamic regex 🙁 RewriteRule ^(.*).js/[0-9]+/$ $1 [NC,L] -> /resources/js/general well, but: RewriteRule ^(.*).js/[0-9]+/$ $1.js [NC,L] -> /resources/js/general.js/1234/ and: RewriteRule ^(.*).js/[0-9]+/$ $1.js [NC,L] -> /resources/js/general.js/1234/ thank you 🙂 Source:…
Read more

Unable to remove query string in .htaccess rewrite

I have read many posts and documentation, and still cannot make this work. Probably missing something trivial. I want www.domain.no/?id=val to rewrite to www.domain.no/index.php The code in .htaccess is RewriteEngine on RewriteBase / # Test that pathname exists, and is NOT a directory. RewriteCond %{REQUEST_FILENAME} !-d # Test that the pathname with a .php extension exists, and is a regular…
Read more

how create clean urls using htaccess

Hi i want to create clean urls but my htaccess file does not create any effect. Original url – http://example.com/abc/def/?page=1 required url – http://example.com/abc/def/page/1 I am using following htaccess file. I want to place this file in the def directory RewriteEngine On RewriteRule ^([a-zA-Z0-9]+)$ page?id=$1 RewriteRule ^([a-zA-Z0-9]+)/$ page?id=$1 Source: apache

apache 2.4 custom error responses

After upgrading from apache 2.2 to 2.4, when running apachectl configtest I am getting following error Syntax error on line 36 of /etc/httpd/conf.d/mod_security.conf: Unsupported HTTP response code 509 Line 36 of my /etc/httpd/conf.d/mod_security.conf: ErrorDocument 509 “The page you are requesting cannot be served.” Any Ideas how to resolve this one. Source: apache

Apache Proxy to add content length header

I’m trying to configure my apache to add a content-length(using mod_proxy- sendcl 1) on a chunked encoded request then pass this request(with the newly added content-length) to my SOAP UI but I’m not sure how to do this. Can someone give me an example how to do this? Thank you, Source: apache

Doing a wget on local http fails

I have setup a local http to host a few files. wget http://10.x.x.x/HDP/suse11sp3/2.x/updates/2.3.0.0/hdp-select/hdp-select-2.3.0.0-2557.noarch.rpm succeeds on 2 of the 3 machines. I try the same on the 3rd machine in throws the following error –2015-10-07 13:39:36– http://10.x.x.x/HDP/suse11sp3/2.x/updates/2.3.0.0/hdp-select/hdp-select-2.3.0.0-2557.noarch.rpm Resolving proxy… 147.x.x.x Connecting to proxy|147.x.x.x|:8080… connected. Proxy request sent, awaiting response… 503 Service Unavailable 2015-10-07 13:39:36 ERROR 503: Service Unavailable. I dont want…
Read more

Sending session_id parameter to php script as an URL

My php script called postback.php gets data in an URL where one of the parameters is session_id. Like http://example.com/postback.php?user=xxx&data=yyy&session_id=134580964357994579&data2=xxx Actually the server (apache2) is redirecting the request to the default page (index.php) when session_id is in the url before anything could happen. What could I do to get the value of this parameters? The session_id parameter can not be removed…
Read more

Apache redirect 301

I created the following RewriteRules: RewriteCond “%{ENV:reten}” !”=already” RewriteRule ^/[/]c/([^/]+)$ c/$2 [L,NC,R=301,E=reten:already] RewriteCond “%{ENV:reten}” !”=already” RewriteRule ^//[/]c/([^/]+)$ $1/c/$3 [L,NC,R=301,E=reten:already] What is happening: 1) user types: http://foo.com/k1/k2/c/k3 2) Apache will redirect to http://foo.com/k1/c/k3 — because the second rule is applied. 3) The above http://foo.com/k1/c/k3 URL will be treaten by Apache and will applied the first rule and will switch it to:…
Read more