Jump to content

danbopes

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

danbopes's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Do you have any other .htaccess files, such as in a "saucy-cakes" folder? The .jpg would have to be from another rewrite somewhere. I would suggest turning on rewritelog, and see how things are being rewritten.
  2. No change
  3. This is a different issue entirely, no longer is about multiple mod_rewrites, it's about mod_alias working together with mod_rewrite. <VirtualHost *:80> ServerName demo1.example.com ServerAlias www.demo1.example.com DocumentRoot "/var/www/demo1" Alias /app "/var/www/app" </VirtualHost>
  4. This is the directory structure I have: /var/www/demo1 /var/www/app The document root for demo1.example.com goes to /var/www/demo1, (Virtual host), and I also have an Alias in demo1 (/app), to goto /var/www/app. In my app folder, I have the following .htaccess file: RewriteEngine on RewriteCond $1 !^(index\.php|images|user_guide|assets|robots\.txt) RewriteRule ^(.*)$ index.php/$1 [L] In essence /app/test, should redirect to /app/index.php/test. This is what I get tho: 404 Not Found: /var/www/app/index.php/test It does exist, but I think it's trying to tell the browser to go there, and it should be going to /app/index.php/test.
  5. I need it to chain, the problem is the order of how it rewrites stuff. For example: demo1.example.com/home/index First rewrite (In root) should say, hey, you need to goto /demo1/home/index Second rewrite (In /demo1) should say, hey, you need to goto /dev/home/index Third rewrite(In /dev) should say, hey, you need to goto /dev/index.php?/home/index Problem is this, if the folder home exists, with a .htaccess file in it, the order then becomes: First rewrite (In /home): /home/index.php?/home/index Second rewrite (In root): /demo1/home/index.php?/home/index Third rewrite (In /demo1): /dev/home/index.php?/home/index It should go like the first one, and rewrite it to the demo1 folder, before trying to look in the home folder to begin with. That's the only rule I need to have go before the others, and putting it in the server config did not do anything. Please help.
  6. Is this something that can't be done? I'm guessing by the lack of responses, it seems like the set order is .htaccess files first, then system wide stuff, which doesn't seem right.
  7. OK, I have a situation, where I want to use mod_rewrite in three places to finally end up at the url I want. Sample URL: demo1.example.com/home/index In my Document Root I have: RewriteEngine on RewriteCond %{HTTP_HOST} ^(?:www\.)?[^./]+\.[^./]+\.[^./]+$ RewriteCond "%{HTTP_HOST}%{REQUEST_URI}" !^(?:www\.)?([^./]+)\.[^./]+\.[^./]+/?\1/ RewriteRule ^(.*) %{HTTP_HOST}/$1 [C,DPI] RewriteRule ^(?:www\.)?([^./]+)\.[^./]+\.[^./]+/(.*)$ /$1/$2 In my demo1 folder I have: RewriteEngine on RewriteRule ^(.*)$ /dev/$1 In my dev folder I have (Code Igniter's rewrite): RewriteEngine on RewriteCond $1 !^(index\.php|images|user_guide|assets|robots\.txt) RewriteRule ^(.*)$ index.php/$1 [L] So the end result is that it demo1.example.com/home/index should goto /dev/index.php/home/index. This semi works, but here is where the problem comes in. If the folder "home" exists, and there is a .htaccess file in there, it will process it before the parent (Which says go into the demo1 folder), and it ends up giving a 404. Is there a way I can fix this? I've tried adding the initial Document Root into the httpd.conf file, as well as in the <Directory></Directory> tags, and I ended up getting no rewrite, and same issue respectively when I did that. How can I fix this?
  8. I'm looking through, and it seems very promising. The question I have, is if the clients internet is down, and they are unable to connect to the "server", is it possible to have it cache the data and upload it in blocks?
  9. I have a client and a server solution setup at the moment. We are currently creating an API that will be run on the clients end that will allow their clients to connect to them. On our end, we want to log the number of attempts are API is being used so that we may charge the clients appropriately. My question is this. How is the most efficient way of doing this? Do I call mysql_connect from the client and just shoot the insert log statements across the web. Should I create a php script on our end that looks for post/get input and takes the data and inserts it? What if the client can't connect to our server; should I cache the data and send it off all at once? Should I create a job that every hour shoots up x records API requests happened? Relatively confused at what angle I should be taking when approaching this. I want this to be scalable to a point where we can have thousands of requests an hour, and not horribly slow down apache/mysql running at either end (Specially if the server is talking with several clients).
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.