Advanced URL Rewriting
Jul 11, 2007I know how to use basic URL rewriting, but I'd like to redirect URLs like this:
[url]
to this:
[url]
Is that possible to do this with Apache mod_rewrite?
I know how to use basic URL rewriting, but I'd like to redirect URLs like this:
[url]
to this:
[url]
Is that possible to do this with Apache mod_rewrite?
I've got a big .htaccess file which works brilliantly in mod_rewrite for apache. However, the client I want to use it for uses a windows server which is based on IIS.
Does anyone have experience with rewriting urls on IIS. Is it easy, could I easily change this:
RewriteCond %{REQUEST_URI} !^/(.+).php$
RewriteCond %{REQUEST_URI} !^/$
RewriteCond %{REQUEST_URI} !^/products.php$
RewriteCond %{REQUEST_URI} !^/special-offers.php$
RewriteCond %{REQUEST_URI} !^/best-sellers.php$
RewriteCond %{REQUEST_URI} !^/spares.php$
RewriteCond %{REQUEST_URI} !^/images/
RewriteCond %{REQUEST_URI} !^/css/
RewriteCond %{REQUEST_URI} !^/components/
RewriteCond %{REQUEST_URI} !^/Special_Offers
RewriteCond %{REQUEST_URI} !^/Best_Sellers
RewriteCond %{REQUEST_URI} !^/Spares
RewriteRule ^([^/]+)/?$ products.php?show=cats&main_category=$1
Into something that would work. Someone mentioned using asp.net but I've never looked at this before, and can't afford to spend too long this.
Is there a quick/reliable solution (apart from switching webserver).
For some reason I have some old urls which just don't want to rewrite. I have lots of others working fine but I think it may be to do with the symbols in these paths which are stopping it from working. Ideally these should be 301'd.
I need view.asp?filter=category%20name to go to category-name
I need to accomplish the following:
1. User hits my new 2.4 reverse proxy at [URL] ....
2. I proxy the request through to my "real" app server at [URL] ....
3. I also use a re-write rule to add a querystring to the URL: ?Parameter=Foo
4. So, client's request arrives at the my app server as [URL] .....
5. When my app server responds, it is including the Parameter=Foo key/value combination. I don't want this.
6. I want my reverse proxy (somebox.com) to strip "Parameter=Foo" from the string which gets returned to the client.
I have steps 1 & 2 working nicely, but it looks like I can't handle the last bit with with mod_rewrite. I found mod_filter and mod_substitute, but it appears that this stuff is used for re-writing strings IN the document. Can these libs be used to maybe modify (I'm guessing here) the headers so that the "?Parameter=Foo" string can't be seen on the client if they're running something like fiddler?
I am using an apache reverse proxy :
httpd -version
Server version: Apache/2.2.15 (Unix)
Server built: Oct 16 2014 14:48:21
In front of an internet liferay server, I m forcing https connexion and my reverse proxy is the SSL endpoint, and it is working fine.
But inside the liferay page there are "http" link to other webserver, and browser are refusing to load them because they are http and not https.
Is there a way in the reverse proxy to rewrite "on the fly" "http" link to "https" so that everything would be load on the browser ?
I was thinking mod_proxy_html but it doesn't seams to do what I want.
i have made my all pages with .html extension and hence my SEO is based on accordingly. Now i made some changes to htaccess that causes to not inclusion of header and footer pages (both are made with .php extension ). so i decided to change the extension of pages (.html to .php) and it wokrs. due to SEO and large number of pages i want all my pages .php (made later). to get converted automatically with .html in browser. so is it possible using .htaccess rewrite.
View 1 Replies View RelatedPeople have been abusing my web proxy servers to send SPAM emails. I use PHProxy and I have no mail ports open on my server, or any mail scripts. My network is http://privax.us
Examples of emails (I have listed some notes):
My IP: 75.126.48.148
[url]
Received: from mail.anpmall.net ([75.126.48.148]) by mail.anpmall.net with HTTP (Code-Crafters Ability Mail Server 2.55); - Hmm?
----------------------------------------
My IP: 75.126.48.148
[url]
----------------------------------------
My IP: 75.126.48.146
[url]
Received: from 216.154.195.49 ([172.18.12.134]) by vms047.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 - hmm Java?
----------------------------------------
My IP: 75.126.48.148
[url]
I found in logs access to webmail.bellsouth.net at the time of the spamming, so I have blocked use of bellsouth.net on my proxy and banned the IP's. See
[url]
----------------------------------------
These are just some of the spam reports I have, and this is really doing my head in. As mentioned my servers do not have mail ports or mail scripts on them. They use webmin (stripped features) for a control panel.
I really need to find out why my IP is always at the bottom of this. I have asked in this forum before but did not have much luck. I have also contacted security companies to help but they were not sure what is happening.
One theory is the spammers use web based email systems, and when they submit the form the IP (from a PHP POST variable) is my IP because they are running under my proxy. But I have always assumed that if you have an email form and submit it, the server hosting the forms IP gets sent, not the actual persons IP.
That is one theory, but at the end of the day I'm still clueless to how to block this. I have blocked the use of bellsouth.net on my servers but a lot of the spam is coming from anpmall.net as mentioned above.
I have a Windows 2000 Advanced Server where there's a performance issue with some of the .asp pages that retrieve data from Access databases, (I know Access databases aren't ideal for data). These pages will just get stuck/freeze, and then either suddenly spring back to life, or give a script timeout error 0113.
The largest Access database I've seen is 136MB (is that way too large?)
I will probably move some of the large Access databases onto a different server but before I do:
- Are there any tools you can recommend to diagnose exactly what files / databases are causing the problem. I don't think the Win 2000 performance monitor tools even work.
- Can anyone explain more about the technicalities behind this issue. I expect it has something to do with processes, threads, memory, Access drivers being loaded into memory etc etc. Can anyone tell me what they know to put me in the picture better?
I'm trying to delete the IP addresses in the nameserver registration but when I follow the instructions by clearing each input box and then clicking save I get these errors:
ns1.domain.com Error: Nameserver registration failed due to error 533: Object association prohibits operation
ns2.domain.com Error: Nameserver registration failed due to error 533: Object association prohibits operation
Ive contacted namecheap but I still havent heard back from them. Anyone know whats going on? I cant seem to delete these.
We have discussed all the basic methods of securing and hardening the server. Lets leave all the basic and general server securing and hardening I have started this to get advance knowledge in securing and hardening of the server so that it will usefull for all the person So i request all to provide all the vaulable tips and suggestions in advance securing and hardening of linux servers I welcome all the comments related to advance securing and hardening of linux servers.
View 5 Replies View RelatedI am trying to find an application that can listen on a given UDP port, say "6271" and forward all traffic (UDP) sent to that port to another IP (not on the same subnet).
I should not call this forwarding, but instead, cloning (because forwarding usually is only on the same subnet or vlan). The packets should not be modified, (thus IP information in packet ect.)
Is this possible? I have tried some applications such as,
samplicator
You can edit the nginx directives for the desired vhost at the webserver config. However, it seems like that you can only add basic directives, but not something like that:
Code:
http {
# memcached servers
upstream memcached-servers {
server 127.0.0.1:11211;
}
[Code] ....
How can I do that?
i want to install PHP 5.2.5 with shared extensions on a linux Centos 4.4 well everything goes fine i installed and it work but i found out that when you use for example --wtih-mysql it bundles the mysql extension in the php it self so i find out about the shared directive and i did --with-mysql=shared,/mysql/path now php is building the mysql.so but when i include it in php.ini and restart the server i get the folowing error in httpd.conf: PHP Startup: Invalid library (maybe not a PHP library) 'mysql.so' and the extension doesn't work. I was very disapointed and building the php 10 000 times, and then i decided to use extensions bundled in the php and i remove all the shared directives from the ./configure command and build the php and miracle happend when i saw the configure command in phpinfo() it was very different from the one that i wrote in console every extension had "shared" (even the extensions that doesn't haved shared directive before i remove them) and they didn't make errors in httpd.conf and they work perfectly, but not for long after the next rebuild everything was again or bundled or drops errors in httpd.conf and not working.
So lets cut it out:
How can i make all extensions shared and enable/disable them from php.ini