I seem to be having an issue with my Apache Rewrites
RewriteEngine on
RewriteBase /
RewriteRule ^wordpress/?$ / [NC,L,R=301]
RewriteRule ^/$ wordpress/ [NC,L]
I simply need to remove /wordpress from the URL as I have pages within Wordpress I want to be seen as the main directory
At the moment the urls are
domain.com/wordpress/blog
I'd rather not have /wordpress, rather domain.com/blog
Any help?
I just found out my host is on ZEUS..
Please can somebody help me with my rewrites:
domain.com/001234
redirects to
domain.com/001234-some-keywords.html
Apache:
RewriteRule ^([0-9]{6}+)/?$ includes/redirect.php?ref=$1 [L]
RewriteRule ^([0-9]{6})-.*?\.html$ templates/default/index.php?ref=$1 [L]
tried this in Zeus:
match URL into $ with ^([0-9]{6}+)/?$
if matched then
set URL = includes/redirect.php?ref=$1
endif
match URL into $ with ^id/([0-9]+)/?$
if matched then
set URL = home/content.php?id=$1
endif
Is it possible to have Apache htaccess rewrites take effect before it hits django?
For example so I can redirect iPhone users to a completely different domain without even hitting django.
Thanks
i'm wondering about this possibility. Is it possible to make our code written in code and string compile and make it become Executable and can operate without the use of server such as Apache.
The OS environment will be Windows family.
Hi, I feel this is something to do with my httpd setup for apache. I'm using mod_rewrite if that helps but I think that only effects the url.
It seems when I output some data such as:
$sMessage = 'Error';
echo $sMessage;
It works fine but when I do this:
$sMessage = 'Error';
echo ''+$sMessage+'';
It returns 0. Very odd!
Hi
I'm looking for a backend system where your clients can login and upload files to your server, download files from the server and you can delete the users, create users, etc. I do not know the proper name for this kind of software. Maybe its called online file manager? Any recommendations? My server supports PHP, apache and mysq.
Thanks
I've got a standard Rails app with Nginx and Mongrel running at http://mydomain. I need to run a Wordpress blog at http://mydomain.com/blog. My preference would be to host the blog in Apache running on either the same server or a separate box but I don't want the user to see a different server in the URL. Is that possible and if not, what would you recommend to accomplish the goal?
I just found out that I can write a really simple web server using Python. I have already an Apache web server I would like to try the Python based web server on this machine. But I am afraid that I can get some kind of conflict if I try it. I mean how two web server will "decide" who needs to server a request from a client?
Is there a difference between these URLs in regards to having slashes at the end of the URL?
https://drchrono.com/about_us
https://drchrono.com/about_us/
Do web frameworks and web servers (e.g. Apache, Nginx, Django) handle these requests differently?
The web server is Apache. I want to rewrite URL so a user won't know the actual directory. For example:
The original URL: www.mydomainname.com/en/piecework/piecework.php?piecework_id=11
Expected URL: piecework.mydomainname.com/en/11
How to achieve it with mod_rewrite?
Is is applicable to use Apache FileUpload lib to to upload files to Glassfish v2 server using standalone client? If yes, what are the differences for this purpose?
I'm trying to hide the "Server" header returned by Apache on every request, from Varnish.
Using in sub vcl_fetch:
unset obj.http.Server;
on Varnish start I get:
Expected action, 'if' or '}'
(/etc/varnish/default.vcl Line 43 Pos 9)
unset obj.http.Server;
--------#####-----------------
Any ideas?
Before re-inventing the wheel, I thought I'd see if anyone is aware of an updated version of something like apache commons-beanutils (basically interested in using reflection-based services for populating and extracting bean values), especially one that supports generics.
I have got a .NET winform application that uses a Web Mapping Service that is password protected. Unfortunately I cannot attach a username and password to requests, ( the request are generated from a GIS mapcontrol)
I can think of two ways around it
Intercept all web requests from my .NET app and add a username/password
Set up an Apache webserver and use proxypass to pass along my request adding a username/password
Does anyone know how to do either of these?
hi,
I have installed my website in a subfolder www.server.com/folder/index.php
Is there any way to hide "folder/" in my url ?
The only solution I can think is to change Directory Root on the apache config file, but unluckily I don't have access to it
thanks
When i tried to install http in my ubuntu 11.10, i got the following error
configure: error: APR not found. Please read the documentation.
then i followed the instructions in [questions/9436860]: Apache httpd setup and installation
Here too i got error as follows
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
what should i do now. Thanks in advance
Hi,
My Apache/PHP installation is making me use instead of . Where is this found in the configuration file so that I don't need to do the former? I'm assuming it's in php.ini, but not sure what it would be called.
I am trying to host some files/rails app in the port 8080 for external access. For python I am using the SimpleHTTPServer module, and for rails, webrick. However, both of them does not work very well. I don't get the response back, and, sometimes, if I get it, it's VERY slow. Nevertheless, apache works very well on the port 8080 (i am not running them at the same time). What is going on?
The Apache Module mod_status allows you to view the current average requests per second being served. It measures this average over a fairly long period of time however (I don't know exactly how long). Is it possible to modify this length to something shorter so that I can get a more accurate idea of the current load on the server?
Hello,
I have discovered that my access_log is occupying most of my HDD. It's over 200 GB in size. How can I reset it ?
I am using Apache 2.2.3 on a CentOS server with Plesk.
Thank you guys !
Hello, I'm developing a web page in Django (using apache server) that needs to call a shell command to enable/dissable some daemons. I'm try to do it with
os.system(service httpd restart 1>$HOME/out 2>$HOME/error)
and this command doesn't return anything. Any idea how can i fix this?
I had a rule in the .htaccess file in my root directory that said:
RewriteCond ^(.*)$ $1.php
I've completely rewritten the file since then, and the rule is still being applied. I tried restarting the Apache server and the physical server with no luck.
I've also scoured the directory and there are no other .htaccess files in there or any subdirectories.
Does anyone know what might be causing something like this to happen?
Does mod_rewrite work for windows servers too? If not, how does windows use regular expressions the same way you can using the .htaccess file in Apache?
The web app occasionally get hang for about 30 seconds when user request a web page, the server's CPU and memory usage are ok, and the jstack shows:
"http-9999-3" daemon prio=6 tid=0x552f3400 nid=0xf40 runnable [0x578fc000]
java.lang.Thread.State: RUNNABLE
at org.eclipse.jdt.internal.compiler.parser.Parser.getTypeReference(Parser.java:8354)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeClassHeaderExtends(Parser.java:2125)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:5107)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9020)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9251)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9208)
at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:7864)
at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:587)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:413)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
- locked <0x10a75fc0> (a org.apache.jasper.servlet.JspServletWrapper)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
......
seems it's related with some jsp files, how to find the root cause? thanks.