Need help with Apache rewrite
It's me again, the guy that needs help constantly and consistently... :)
I have a URL:
that must be accessible as:
I've tried adding this into my httpd.conf:
RewriteRule ^/abc/def/ghij/kinetik_web_test/(.*)$ /abc/def/ghij/kinetik_web_test/hs.xsl/$1 [L]
The result? It does not work! :cry:
I got this in my httpd.conf as well right at the bottom:
Alias /static/ "/kinetik/ftppub/upl/"
Allow from all
FileETag MTime Size
The redirect-bit was added after the above.
I have no .htaccess files anywhere.
Please can someone help me with this?
mod_rewrite... geez it's been a while since I've played with this :/ How is it not working? The rewrite just not seeming to happen at all, a 500 server error or the rewrite is working but the regex isn't quite right?
That's what I am struggling with.
When I try to access the page from another PC, I get a page that says "ACCESS RESTRICTED BY IP". I think this is like a standard errorpage though, since even if I type in a URL that doesn't exist on my Apache Server it still just brings up this message.
One of the other guys told me he tried to access the page from the server itself and there it seems to work just fine. :confused:
I'm starting to think the problem is somewhere else...
Quite possibly, keep checking your logs over and over, they always contain helpful information. One of my favourite debugging tools is 'tail -f /var/log/<some_log>' open in a window while I experiment :)
Did you try doing this OUTSIDE of Apache? Something like this:
Also, look at your error_log file and see what the specific problem is. This will probably give you more detailed info than that browser "RESTRICTED BY IP ADDRESS" error message. I never really checked, but I didn't think Apache gave details in its return codes about why you were restricted. The fact that you were restricted, yes, but why?, no. I could be wrong about this, so don't quote me. Could it be that your browser is embellishing the message sent by Apache and mangling it in the process? error_log would point this out.
Thanks cs-cam, the tail-thing is really good advice. :)
heartig, the thing is the server has Websphere running as well. It gets really confusing since it seems even if the Apache-side is working 100%, Websphere might still have a big say in the whole delivery. I don't know much about Apache, but I know absolutely nothing about Websphere.
I'm guessing, but I think the Apache side of things is working just fine. My money is on Websphere not playing ball, but then again I could be wrong. I'm going to work through the logs of Apache just to be sure and get someone with Java savvy to check out the Websphere side of things.
Stay tuned as I'll post what the eventual solution was as soon as it's been figured out, and thanks for the help so far! :)
IT's SOLVED!!! :)
Finally, we got it to work! The problem was indeed with Websphere. It seems it plugs into Apache (httpd.conf references it).
The Websphere has a conf file of it's own (startup.conf) where you can set the IPs of clients. I just added a *.*.*.* and she worked lovely!
But now I have another problem: I can get through to http://server/abc/def/ghij/kinetik_w..._ENX_HTML.htm/
but now I get an error saying that there was no stylesheet to transform the XML file to HTML (or something like that).
How can I get the XML file to still reference the HS.xsl stylesheet without having to add "hs.xsl" in the URL?
Nevermind, it seems the person that wanted this just needed to see the xml data across the web, which is exactly what's happening now! :)
So, a big thanks to haertig and cs-cam.
|All times are GMT -5. The time now is 03:35 PM.|