Apache Mod-Rewrite Question

I'm using the following mod-rewrite rules on one my websites,
which is a
database-driven CMS:
RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$
About/index.php?bout=$1 [L]
RewriteRule ^World/([a-zA-Z0-9()_/-]+)/?$
World/index.php?area=$1 [L]
RewriteRule ^Topics/([a-zA-Z0-9_/-]+)/?$
Topics/index.php?topic=$1 [L]
I'd like to create another rule for the site's home page -
index.php.
I'm not sure how to write it to begin with...would I just
replace
"About/index" in the first example above with /index.php, or
index.php?
Also, if I establish a mod-rewrite rule for a page named
index.php, then
I suspect that might interfere with my other mod-rewrite
rules, as all
of the folders contain pages named index.php.
Does anyone know how to write a mod-rewrite rule for a site's
home page
(index.php) that doesn't interfere with other index pages?
Thanks.

Why do you want to do this?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"David Blomstrom" <[email protected]> wrote in
message
news:e2hcak$np9$[email protected]..
> I'm using the following mod-rewrite rules on one my
websites, which is a
> database-driven CMS:
>
> RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$
About/index.php?bout=$1 [L]
> RewriteRule ^World/([a-zA-Z0-9()_/-]+)/?$
World/index.php?area=$1 [L]
> RewriteRule ^Topics/([a-zA-Z0-9_/-]+)/?$
Topics/index.php?topic=$1 [L]
>
> I'd like to create another rule for the site's home page
- index.php. I'm
> not sure how to write it to begin with...would I just
replace
> "About/index" in the first example above with
/index.php, or index.php?
>
> Also, if I establish a mod-rewrite rule for a page named
index.php, then I
> suspect that might interfere with my other mod-rewrite
rules, as all of
> the folders contain pages named index.php.
>
> Does anyone know how to write a mod-rewrite rule for a
site's home page
> (index.php) that doesn't interfere with other index
pages?
>
> Thanks.

Similar Messages

  • (OT) Incompatible Apache Mod-Rewrite Rules

    The following Apache mod-rewrite rule works:
    RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$
    About/index.php?bout=$1 [L]
    It displays URL's like mysite/About/Webmaster and
    mysite/About/Search.
    I've finally figured out how to apply a mod-rewrite rule to
    my site's
    home page...
    RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?home=$1 [L]
    It displays URL's like mysite/Arizona and mysite/Africa.
    But when I combine them...
    RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?home=$1 [L]
    RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$
    About/index.php?bout=$1 [L]
    The first rewrite rule appears to knock the second rule out
    of action.
    Does anyone know how to modify either rewrite rule to make
    them compatible?
    Thanks.

    On 4/26/06 8:52 AM, "David Blomstrom" wrote:
    > The following Apache mod-rewrite rule works:
    >
    > RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$
    About/index.php?bout=$1 [L]
    >
    > It displays URL's like mysite/About/Webmaster and
    mysite/About/Search.
    >
    > I've finally figured out how to apply a mod-rewrite rule
    to my site's
    > home page...
    >
    > RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?home=$1
    [L]
    >
    > It displays URL's like mysite/Arizona and mysite/Africa.
    >
    > But when I combine them...
    >
    > RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?home=$1
    [L]
    > RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$
    About/index.php?bout=$1 [L]
    >
    > The first rewrite rule appears to knock the second rule
    out of action.
    > Does anyone know how to modify either rewrite rule to
    make them compatible?
    >
    > Thanks.
    I'm not an expert on mod_rewrite, but you might be able to
    get what you want
    simply by reversing the order of the rules:
    RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$
    About/index.php?bout=$1 [L]
    RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?home=$1 [L]
    In theory, that should redirect your /About pages, and the
    [L] tells Apache
    not to parse any more rewrite rules, so the first rule (which
    looks like it
    simply redirects *everything*) wouldn't come into play.
    There's something about times when Apache still parses
    rewrite rules even
    after the [L] flag, though, so that might not work. Why don't
    you see if
    that works, and if it doesn't, we can look at it further.
    Sonjay

  • Mod Rewrite & .htaccess File on a Mac (Leopard)

    I just copied all my websites over from my PC to my Mac and
    discovered
    that my .htaccess files (originally created in Notepad)
    vanished...or
    have simply become invisible. So what program do most people
    use to
    create .htaccess files on a Mac? Do I need to track down my
    Notepad
    version and delete it, or do they actually disappear on a
    Mac?
    Also, I've read that mod rewrite doesn't work a Mac unless
    you enable
    it. Actually, I assume that isn't true for Leopard, as I
    checked several
    pages on my CMS, and they seemed to be working.
    Still, I'm wondering what other surprises might be in store
    for me. Can
    anyone else who has migrated their websites from a PC to a
    Mac tell me
    what obstacles you ran into?
    I recently upgraded to Leopard and MAMP Pro and just
    installed Adobe
    Creative Suite, Web Premium.
    Thanks.

    Thanks.
    pauljmartinez_sf wrote:
    > The .htaccess file is just a plain text file so any
    decent text editor can
    > create and modify the files.
    >
    > There should be no cross platform issues using a
    .htaccess file since it is
    > used by the application and not the OS. .htaccess files
    are for Apache, so if
    > you're running a local version of Apache you should be
    all set provided Apache
    > is configured to allow .htaccess files.
    >
    > Mod-rewrite is also used by Apache and not the OS so no
    problems here being on
    > a Mac. You just need to make sure that mod_rewrite is
    anabled. You might be
    > able to do this from MAMP, otherwise you'll need to make
    the change in the
    > httpd.conf file for Apache and then restart Apache.
    >

  • Apache Url rewrite for portal URLs

    Hi,
    I have a requirement where i need to write simple URL's for the default portal uRL's
    for example
    inspite of using default url like "http://myserver:port/portal/server.pt/community/abc_xyz/123/efg_jkl/12345",
    if user uses
    "http://myserver:port/portal/server.pt/xyz"
    It should navigate to same default URL.
    Can somebody let me know how this can be achieved.
    I know Url rewriting is done through Apache Url rewrites but do not have an idea how apache does it with portal Url's. What configurations need to be done in order to manage portal Url's with apache rewrites.
    Thanks
    Ajay

    Hi Ryan,
    Thanks for the reply. The link shows how to write the Rewrite rules in apache. I am familier with that. The actual problem is that how can the portal Url's be controlled by apache rewrites. My apache and weblogic are both on the same server instance but after writing the rewrite in httpd.conf file. It does not work out. Just want to know how can i tell apache to handle my portal Url's too.
    Is there any specific entry that we need to make for doing this.
    Thanks
    Ajay

  • HT201365 my iphone has been stolen, but my iphone  have passcode and i put  airplane mode. my question is can someone access  my phone  when they bring to shop?

    my iphone has been stolen, but my iphone  have passcode and i put  airplane mode. my question is can someone access  my phone  when they bring to shop?

    Not without the passcode.

  • Apache URL rewrite

    Hi,
    To make iPlanet work with apache, documentation ask me to change
    httpd.conf so that all request comes into apache will forward to
    iPlanet.
    But I need to use URL rewrite module of apache contains the rewrite rule
    RewriteRule ^/lmp
    /NASApp/delivery/servlet/delivery;jsessionid=%{QUERY_STRING} [PT,NS]
    which means if URL contains /lmp then rewrite to iPlanet handler
    /NASApp/...etc
    any one had successfully configure apache mod_rewrite works with
    iPlanet?
    In my pervious experience with Tomcat apache. I realize I have to load
    the web-server-plugin module before module rewrite module. But if I do
    that with iAS. then i get 404 not found on request to servlet.
    thanks

    We use iPlanet and apache with mode_rewrite
    Try this:
    RewriteEngine On
    RewriteLog /usr/local/apache/logs/rewrite.log
    RewriteLogLevel 1
    # Rewrite Rules for App1
    RewriteCond %{HTTP_HOST} ^app1.company.de$
    RewriteRule ^/ https://myiWS.company.de:8011/NASApp/app1/mystartup.jsp

  • Apache Version Upgrade Question

    Hi all,
    My machine config:
    OS: SunOS 5.8
    Apache Version: 1.3.26
    I'd like ot upgrade my apache to a newer verion. I've dound the following link for the Sun Patch:
    http://sunsolve.sun.com/search/document.do?assetkey=1-21-116974-01-1&searchclause=apache%20patch
    but I've the following question:
    - How do i know whether my currenct config fit the patch requirement (Required Patches:108529-29 or greater) ?
    - To what version of apache it will be after the patch is installed?
    - Or should i found a patch from apache.org ? But actually i couldn't one. Any suggestion ?
    Many Thanks
    Daedalus

    Hello Daedalus,
    showrev -p shows the installed patches and their revision.
    According to the patch's readme you get at least 1.3.31
    Problem Description:
    5048900 Multiple security bugs in Apache versions prior to 1.3.31
    Is this Solaris x86 or SPARC ? The mentioned patch is for Solaris x86.
    Michael

  • Wireless 5508 HA mode, urgent question! Many thanks

    Hi, experts,
    our company has order two WLC 5508 and want to deploy as HA mode.
    one is air5508-12-k9, another is air5508-HA-k9.
    however, due to proper installation, someone has installed license into HA model, right now, two WLCs are both primary.
    When I wanted to convert WLC back to HA by using"config redundancy secondary" command, it displays I need minimal AP licenses to convert it.
    My question is
    1. is there any way to identify this model is HA or not HA model, I've checked WLC's label and inventory and PID, both are AIR5508-K9. it's not clear which is HA.
    2. if order is correct, is there possible to convert WLC to HA mode without AP license (50) ? I've reset config to factory default, but no use.

    Hi,
    1. is there any way to identify this model is HA or not HA model, I've checked WLC's label and inventory and PID, both are AIR5508-K9. it's not clear which is HA.
    If you bought this part number :AIR-CT5508-HA-K9 - Cisco 5508 Series Wireless Controller for High Availability, means you have HA WLC.
    AIR5508-K9  - It means that it just a normal model with AP license.
    2. if order is correct, is there possible to convert WLC to HA mode without AP license (50) ? I've reset config to factory default, but no use.
    There is no way to convert t HA mode without 50 AP license.
    Regards
    Don't forget to rate helpful posts

  • CSS11506 http header rewrite question

    Hi
    I read the ACE doc, and it said that cisco ACE supports the capability to rewrite http headers in both client requests and server responses. Is CSS11506 can do it?
    I have a lot of problems that application on the local server redirect https to http. Because the way they do installation which standard way and it can not fix or hardly to fix.
    I would like to get a tip to let css11506 rewrite the server's rewrite. is it possible?
    Any comments will be appropriated
    Thanks in advice
    julxu

    Hello Julxu,
    If I understand your question correctly, you are looking for the CSS rewrite the URL from http to https when the server sends a redirect to the client.  If I'm correct, then you can find out how to accomplish this in the Specifying Secure URL Rewrite sectioin of the CSS configuration guides.
    Hope this helps,
    Sean

  • Fsck mode-related Question

    Hello, there...
    About a month or two ago, I posted about some problems my iBook G3 Dual (running OS X 10.2.8) was having. I deduced that it stemmed from a Logic Board replacement Apple did, and subsequent repairs. I've already sent the computer in for repair 3 times since September, but even though they've replaced the hard drive and other things, the machine continues to come back with the same or worse problems. I'm trying to avoid calling them again, as it's been a hassle waiting for the machine to be repaired, only to find that it's still no good when I get it back. I'm losing precious hours of work every time this happens, and can't trust installing anything or saving anything for fear of losing it in an instant as I have every time.
    The machine powers up, but I get the flashing folder with the smiley face and question mark. Tried everything from zapping the PRAM, resetting the PMU. Safe mode, Target Disk/Firewire Mode, Verbose mode - none works. Tried putting in the Install CD (came with OS X 10.2.1), but it doesn't recognize the harddrive to either run repairs, nor re-install. Tried fsck as well, but it will only go into fsck mode, when the Install disc is in, therefore, fsck runs only on the Install CD itself, and naturally, says that volume is okay?
    Does anyone out there know enough about fsck to specifically give a method, and/or some commands that will help me redirect the fsck to pinpoint the underlying system? Again, the Install disc currently has to be in the machine for fsck to run, but I need to then know what to put in the command lines to have fsck run on the system itself, instead of checking the CD. All sources I've found pertaining to fsck assumes that the mode is being run without an Install disc put in the computer, but I am unable to make it work this way.
    Thank You

    The machine powers up, but I get the flashing folder
    with the smiley face and question mark. Tried
    everything from zapping the PRAM, resetting the PMU.
    Safe mode, Target Disk/Firewire Mode, Verbose mode -
    none works. Tried putting in the Install CD (came
    with OS X 10.2.1), but it doesn't recognize the
    harddrive to either run repairs, nor re-install.
    Tried fsck as well, but it will only go into fsck
    mode, when the Install disc is in, therefore, fsck
    runs only on the Install CD itself, and naturally,
    says that volume is okay?
    Two things... did you try single-user mode, and did you try holding option on start to see a list of bootable disks?
    Here's the thing... if DiskUtility (on the install disk) doesn't even see your HD, there's something wrong much past what fsck can fix. The first thing to check is probably that the apple engineer who last worked on your comp remembered to plug your HD back in, both to power and to the ATA bus. If that didn't happen, it would very easily explain you not being able to boot.
    Other than that... I can't think of anything else to try

  • Routed or bridged mode + licensing question

    Hi Cisco ACE gurus,
    I have the following questions and I would be grateful if anyone could answer them.
    1) As we know the basic license for ACE limits its throughput to 4Gbps. What does it mean? Does it mean that only load balanced traffic is limited (policed) to 4Gbps? Or any other traffic passing through ACE is limited to 4Gbps (from what I know ACE is a cef720 linecard having 20Gbps to a switch fabric)?
    My question comes from the following scenario. Let's say ACE is deployed in routed mode and it has 1 client vlan and 2 server vlans. There are VIPs, serverfarms, rservers defined etc.... Now there is a need for a rserver from vlan1 to communicate with a rserver from vlan2 (directly and not through a VIP). In this scenario def gateway of both servers points to ACE (ACE is doing inter-vlan routing).
    So in this case in order to allow for that communication I would need to create ACLs and apply them to ACE interfaces.
    Does it mean that the traffic would be limited to only 4Gbps?
    2) let's say I have 2 DC (2 different geo locations). ACE is located only in one of them. Real servers are dispersed in both of them. ACE is deployed in routed mode. Is it possible to configure ACE in such a scenario (to server VIPs for clients when rservers are in 2 different DC)?
    My assumption is that it is possible and in order to do that I would have to use NAT (and source NAT client traffic) so that traffic sent from client to a VIP could be src natted and go to the other DC (through client vlan), reach the rsevers in the other DC and come back.
    Is it possible to also do that while ACE is deployed in bridged mode?
    While reading about ACE and NAT I came across the sentence "ACE is not able to NAT bridged traffic". What does it mean?
    regards

    sorry Marko but I am lost. We are talking now about one-armed mode of deployment. There
    are 2 contexts and the same vlan is used in both of them (that's why it is shared). In this case I don' understand what you wrote "you have server A in the shared VLAN of context A, you can not reach a VIP from context B" ... that is the same vlan so I can't see any problems..... unless you are describing situation for bridged mode deployment of ACE.

  • Nginx rewrite question

    Hey guys, one quick question regarding nginx and its rewrite rules. Currently on the a recently setup server, with /srv/http as the document_root. I'm keeping it as the bare /srv/http/ so that I can do (domain)/wordpress or (domain)/owncloud etc etc at will, its simple, clean, direct. The only snag is if I just do (domain) I want it to default to the wordpress instance instead of a blank page.
    I know Nginx can do something like this its rewrite rules, but im new enough to nginx that I'm not really sure on how to write them, in a way that would ONLY kick in if given a bare domain, and would leave all other variations, like (domain)/owncloud alone. I copied the server section of nginx.conf below, if someone could give me a hand that'd be awesome.
    server {
            listen       80;
            server_name  example.com;
            #charset koi8-r;
            #access_log  logs/host.access.log  main;
            location / {
                root  /srv/http;
                index  index.html index.htm index.php;

    FathisAeril wrote: server {
            listen       80;
            server_name  example.com;
    Nginx takes the most specific fit first, so the bare domain name gets the rest

  • NAC Appliance in IB VGW L3 mode - routing question

    Hi!
    I'm testing Clean Access in In-band VGW mode with clients that are *not* directly connected to the CAS (i.e. L3-adj. mode).
    Can anybody tell me do I need to configure static routes on the CAS for user subnets? It seems that the CAS always send traffic via the trusted eth0 interface with the eth0 IP as the source. It doesn't use the eth1 IP (even if it is different than eth0 IP and the static route is pointing via the eth1).
    So, it seems that eth1 (untrusted side) IP doesn't really matter and static routes are not used in VGW mode. Is my understanding correct?

    Thanks a lot for the replay, however it doesn't help.
    > The traffic destine for client will have to come in the trusted and out the untrusted. The return traffic has to come in the untrusted and out the trusted.
    This is only correct from bridging point of view. This is *not* correct from routing point of view.
    1. As you know static routes are used to route traffic, right? And the routing is needed for *VGW* CAS solely to communicate with clients and the CAM.
    2. As you pointed out earlier "the CAS usually has the same IP address on trusted and untrusted interfaces", right?
    3. This IP address is needed for CAM-CAS communications, right?
    4. So, it must be from the same IP network as the CAS default gateway. For example, the CAS trusted (and untrusted) IP is 10.10.10.1, the default gateway for CAS is 10.10.10.2.
    5. At the same time the remote users are coming from the untrusted side. The previous-hop router (on the CAS untrusted side) has the IP address 192.168.88.1 and the next-hop router (on the CAS trusted side) has the IP address 192.168.88.2. The user's network is 172.16.172.0. So far, so good?
    6. What are you suggesting now: specify on the CAS the following IP route:
    172.16.172.0/24 via 192.168.88.1 (via untrusted eth1)
    7. The problem is that the untrusted (eth1) interface has the IP address 10.10.10.1 and the router has 192.168.88.1! They're on different subnets! Does this route make sense? It looks more like a shortcut than a normal route. Why not just use the default route pointing to the 10.10.10.2 to reach the 172.16.172.0? The traffic can reach user subnet 172.16.172.0 via the following path: 10.10.10.1(trusted intf)->10.10.10.2->192.168.88.2->192.168.88.1->172.16.172.x!
    The only question is: which interface, trusted or untrusted, the CAS will use to communicate with clients in case it has the same IP on the untrusted and trusted interfaces and no other routes configured, except the default route?
    I know for sure, if the VGW CAS has different IPs on the trusted and untrusted interfaces, it always use the trusted interface to communicate with clients!
    Pretty clear, right?

  • MSi GE60 2QE Apache Pro - Simple Questions

    Hi,
    I just purchased my laptop yesterday, and overall I'm quite happy with it! I do have a couple of questions:
    1) My idle temperature of my GPU is around 50 degrees, which is a little warmer than my old laptop. Is also true for you other MSi notebook owners?
    2) After installing some software and games, I am somewhat unhappy at the read/write speeds of the given 1TB HDD. I was thinking of installing a SSD to speed everything up. After taking a look at the specifications online, I see that there is also an mSATA socket for a SSD.
    a) The specifications indicate that its up to 128GB. Is this what MSi could potential provide default? Can I install a larger mSATA SSD  (e.g. 256GB), or am I limited to at most 128GB?
    b) Can I have both the mSATA SSD and the 1TB HDD inside the notebook?
    c) If (b) is true, can I clone the data (OS,apps,etc) from the HDD to the SSD, and boot the computer from the mSATA SSD?
    I have only take a quick search, but I saw threads how some users were having issues with the mSATA with their own respective notebook. Is there anything I should know or is there a guide in order to properly add an additional SSD and set it as a boot?
    Thanks for all your help 

    1) Your temperature seems normal for me. I have a GE60 2QE sample here and it also got 90~93 degree while running FurMark, just a maximum.
    2)
     a) I think 256GB is not a big deal, but if you want to make sure, find the post on Internet to see if any one had installed it. I don't think there's any limitation to install SSD more than 128GB.
     b) Yes, your model has at least 1 mSATA port for SSD.
     c) Yes, run the BurnRecovery (the icon on Desktop) to build a recovery image (from hidden partition) and recover it to your newly purchased SSD.
    Remember to buy SSDs for SATA interface, not PCI-E interface.

  • Apache FOP config Question

    Hi all,
    I have APEX version 3.0.1 and I use F&R Services version 10.1.2.0.2. I wanted to use Apache Fop in order to have PDF Printing facilities.
    However in http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html#05
    I saw that the OC4j version needed should be a minimum of 10.1.3.2 version. So I decided to use the OC4j from JDev 10.1.3.3.
    Step 1 from the document above went ok, then when I try to configure FOP in APEX I cannot find "Instance Settings", under Manage Service, even though I am logged in as ADMIN.
    Has anybody any suggestions on this?
    Kind Regards,
    Ana-Maria

    Hi all,
    found the problem. I needed to connect as admin to APEX in order to do this: http://hostname:portno/pls/apex/apex_admin.
    Thank you,
    Ana-Maria

Maybe you are looking for

  • Keyboard/mouse range

    Thinking of getting a new mac mini and using it with my LCD tv as a monitor. What is the range for the new keyboard and mouse. I will be sittng about 10 to 12 ft away.

  • Programmatically open a file and save it in a new directory

    To start off, I'm relatively new to LabVIEW and did a couple searched about this and couldn't find anything pertaining to what I wanted. Right now I have an event structure where I click a button and the file dialog comes up.  I then select a CAN dat

  • Lightroom 3 not downloading...HELP!

    I just recently purchased a new laptop and I'm trying to download the free trial of Lightroom 3. I have signed in and everytime I click the "download now" button, NOTHING happens. I have tried all the troubleshooting and help options on this website

  • Idoc ORDERS05 and EKPO - IDNLF

    Hi all, Is there anybody that knows if it is possible to send EKPO-IDNLF via IDOC ORDERS05? Regards    Federico

  • AISUSER: Customer Number & S-User identification

    Dear Experts, i have installed a SAP Solution Manager 7.0 (SP15) in a Windows Server 2003 OS System 64 bits with MS SQL in a VM (Virtual Machine). My own goal is to update the Solution Manager at the top of the upgrade (Minimum SP17) with the Mainten