Search Results

Search found 3190 results on 128 pages for 'isapi rewrite'.

Page 47/128 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • RewriteCond and RewriteRule newbie

    - by mybrokengnome
    I'm taking over a website for a client that is running on a custom built CMS (that I didn't write). I don't mess with .htaccess files usually because a lot of the hosting I do is on IIS, or I used WordPress as a CMS and don't have to worry about messing with the .htaccess file. Here's the contents of the file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ framework.php?%{QUERY_STRING}&resource=$1& [L] I get what it's doing (sending all requests through the framework.php file). The client wants a WordPress blog added to their site. I'm placing it in a /blog/ folder. The problem is that because of the rewrite rules and conditions in the .htaccess file whenever I try to go /blog/ the other CMS freaks out because it doesn't like me trying to go there. My question is how do I write a rule/cond that tells apache to send all requests made to the /blog/ folder to the /blog/ folder, but keep all other requests piped through the framework.php file like it is now? Any help is appreciated, thanks!

    Read the article

  • ModRewrite weird redirect behavior on removing WWW

    - by vitto
    Hi, I'm trying to use some rule on my project to remove www from the beginning of the URL but I've some problem. my server structure is: domain.com/beta_folder domain.com/beta_folder/page+type domain.com/beta_folder/page+type/content+name domain.com/beta_folder/page+type/content+name/edit domain.com/beta_folder/page+type/content+name/etc. domain.com/beta_folder/.htaccess //here is where my htaccess is beta_folder is the site folder, and content+name are content vars, created to retrieve pages from the database. the site works perfect with this rules RewriteEngine On RewriteRule ^(page\+type/)([a-zA-Z0-9_+-]+)[/]?$ page_folder/page.php?varname=$2 My intention was to remove www, so I've added this rule but it isn't effective RewriteEngine On RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] RewriteRule ^(.*)$ http://domain.com$1 [R=301,L] RewriteRule ^(page\+type/)([a-zA-Z0-9_+-]+)[/]?$ page_folder/page.php?varname=$2 My problem starts if I digit www in front of my domain name: this works http://domain.com/beta_folder/page+type/content+name if i write http://www.domain.com/beta_folder/page+type/content+name the rewrite rule redirect me at http://www.domain.compage+type/content+name if i remove the www rules, the problem still active unfortunately, I can't make a public test for my domain basically, if I write http://www.domain.com/beta_folder the rules sends me to http://domain.com/ where I'm wrong?

    Read the article

  • How to emulate mod_rewrite in PHP

    - by Tyler Crompton
    I have a few URLs that I want to map to certain files via PHP. Currently, I am just using mod_rewrite in Apache. However, my application is getting too large for the rewriting to be done with regular expressions. So I created a file router.php that does the rewriting. I understand to do a redirect I could just send the Location: header. However, I don't always want to do a redirect. For example, I may want /api/item/ to map to the file /herp/derp.php relative to the document root. I need to preserve the HTTP method as well. "No problem," I thought. I made my .htaccess have the following snippet. RewriteEngine On RewriteRule ^api/item/$ /cgi-bin/router.php [L] And my router.php file looks as follows: <?php $uri = parse_url($_SERVER['REQUEST_URI']); $query = isset($uri['query']) ? $uri['query'] ? array(); // some code that modifies the query require_once "{$_SERVER['DOCUMENT_ROOT']}/herp/derp.php?" . http_build_query($query); ?> However, this doesn't work, because the OS is looking for a file named derp.php?some=query. How can I simulate a rewrite rule such as RewriteRule ^api/item/$ /herp/derp/ [L] in PHP. In other words, how do I tell the server to process a different URL than requested and preserve the query and HTTP method without causing a redirect? Note: Using variables set in router.php is less than desirable and is bad structure since it's only supposed to be responsible for handling URLs. I am open to using a light-weight third party solution.

    Read the article

  • Simple problem with mod_rewrite in the Fat Free Framework

    - by ian
    I am trying to setup and learn the Fat Free Framework for PHP. http://fatfree.sourceforge.net/ It's is fairly simple to setup and I am running it on my machine using MAMP. I was able to get the 'hello world' example running just fin: require_once 'path/to/F3.php'; F3::route('GET /','home'); function home() { echo 'Hello, world!'; } F3::run(); But when I try to add in the second part, which has two routes: require_once 'F3/F3.php'; F3::route('GET /','home'); function home() { echo 'Hello, world!'; } F3::route('GET /about','about'); function about() { echo 'About Us.'; } F3::run(); I get a 404 error if I try the second URL: /about Not sure why one of the mod_rewrite commands would be working and not the other. Below is my .htaccess file: # Enable rewrite engine and route requests to framework RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php [L,QSA] # Disable ETags Header Unset ETag FileETag none # Default expires header if none specified (stay in browser cache for 7 days) <IfModule mod_expires.c> ExpiresActive On ExpiresDefault A604800 </IfModule>

    Read the article

  • JavaScript doesn't parse when mod-rewrited through a PHP file?

    - by Newbtophp
    If I do the following (this is the actual/direct path to the JavaScript file): <script href="http://localhost/tpl/blue/js/functions.js" type="text/javascript"></script> It works fine, and the JavaScript parses - as its meant too. However I'm wanting to shorten the path to the JavaScript file (aswell as do some caching) which is why I'm rewriting all JavaScript files via .htaccess to cache.php (which handles the caching). The .htaccess contains the following: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^js/(.+?\.js)$ cache.php?file=$1 [NC] </IfModule> cache.php contains the following PHP code: <?php if (extension_loaded('zlib')) { ob_start('ob_gzhandler'); } $file = basename($_GET['file']); if (file_exists("tpl/blue/js/".$file)) { header("Content-Type: application/javascript"); header('Cache-Control: must-revalidate'); header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT'); echo file_get_contents("tpl/blue/js/".$file); } ?> and I'm calling the JavaScript file like so: <script href="http://localhost/js/functions.js" type="text/javascript"></script> But doing that the JavaScript doesn't parse? (if I call the functions which are within functions.js later on in the page they don't work) - so theirs a problem either with cache.php or the rewrite rule? (because the file by itself works fine). If I access the rewrited file- http://localhost/js/functions.js directly it prints the JavaScript code, as any JavaScript file would - so I'm confused as to what I'm doing wrong... All help is appreciated! :)

    Read the article

  • cannot get FilesMatch and mod_rewrite working together

    - by neil
    Hello, I'm having a little difficulty with my .htaccess when combining a password protection on a file and a mod_rewrite: If I only have this as my .htaccess <FilesMatch "manage.php"> AuthName "Member Only" AuthType Basic AuthUserFile /home/myuser/.htpasswd require valid-user </FilesMatch> It password protects manage.php fine. If I have this as my .htaccess RewriteEngine on RewriteCond $1 !^(index\.php|manage\.php|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] It works as expected: robots.txt, index.php and manage.php are left alone and are called as normal, everything else is redirected to index.php/$1 HOWEVER, If I combine them then when I visit manage.php it gets redirected as index.php/$1, i.e. the FilesMatch is causing the entry in rewritecond to be ignored. If I actually enter a password in the original test and get to the file, it works in this last test. So I guess something is up with the rewrite and the file match. i.e. entering this causes .\manage.php to be called as .\index.php\manage.php <FilesMatch "manage.php"> AuthName "Member Only" AuthType Basic AuthUserFile /home/myuser/.htpasswd require valid-user </FilesMatch> RewriteEngine on RewriteCond $1 !^(index\.php|manage\.php|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] Thanks for any help :)

    Read the article

  • Removing index.php on MAMP

    - by djeetee
    this questions was asked before and has had many responses. The problem is nothing i tried worked. Background: i use MAMP and all of my web project are located under WebProjects which I relocated out of its standard location within the MAMP folder in Applications. so my structure is something like this: Documents/WebProjects/GreatSite/Application/... What happened so far: my understanding is that removing index.php can be done either through httpd.conf or .htaccess. anytime i touched httpd.conf, Apache refuses to start. I tried various edits to .htaccess including the one in codeigniter.com/wiki/mod-rewrite and the last one from a post on SO which is this: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?/$1 [L] this give me the following error when i access the site: An Error Was Encountered Unable to determine what should be displayed. A default route has not been specified in the routing file. I have updated config.php to have $config['index_page'] = ''; and i have placed the .htaccess file in the GreatSite folder. One other note, my CI system folder is up a level from GreatSite. Not sure if this has any impact. also, apache has the module loaded. so, I'm hoping someone has successfully done this on MAMP and could provide direction specifically around the content of their .htaccess (or even httpd.conf), it's location and any other mods they had to make to get this going. thanks

    Read the article

  • ASP.NET url MAX_PATH limit

    - by Greg Ballard
    Hi, I've found an issue with ASP.NET that I know at least has stumped one other person out there. We were trying to use an HttpModule to handle wildcard requests to a web application. The generated url is dynamic and could potentially be several hundred characters long. Unfortunately there appears to be a limitation in the aspnet_isapi.dll file that limits the length of the path in the url to MAX_PATH which is hardcoded at 260 chars. Has anyone else ran into this and found a way around this limit? Query string parameters are not an option. Thanks, Greg Ballard

    Read the article

  • Windows7 IIS7: zips don't have php5isapi.dll Can I use php.dll instead?

    - by Pete Alvin
    The page: How to Install PHP 5.2 on IIS 7and Windows Vista (and a few others) reference a mysterious php5isapi.dll which is not in the Windows install, or the zip files: php-5.3.2-Win32-VC9-x86.zip - VC9 x86 Thread Safe php-5.3.2-nts-Win32-VC9-x86.zip - VC9 x86 Non Thread Safe There was another post on stackoverflow that said it's obsolete and replaced by "fastapi" but no instructions mention this. I did find a php.dll in the zip file. Can I use that instead of php5isapi.dll? It's very frustrating trying to install basic PHP5 on Windows with MySQL.

    Read the article

  • Render ASP in pages with .html extension in Windows CE

    - by Chris
    I want to be able to use the .html extension to render ASP pages. I am using Windows CE 6 at the moment with the default web server, ASP is turned on. I have attempted to add the "ScriptMap" (via) key to the HKEY_LOCAL_MACHINE\COMM\HTTPD\ScriptMap subkey with the value ".html"="\Windows\asp.dll" but this doesn't seem to work. What am I doing wrong?

    Read the article

  • writing a web service with dynamically determined web methods

    - by quillbreaker
    Let's say I have a text file of basic mathematical functions. I want to make a web service that answers these mathematical functions. Say the first one is y=x*x. If I wanted to turn this into a web service, I could simply do this: [WebMethod] public int A(int x) { return x*x; } However, I've extracted the function from the list by hand and coded it into a function by hand. That's not what I want to do. I want the wsdl for the service to be generated at call time directly from the text file, and I want the web method calls to the service to go to a specific method that also parses the text file at run time. How much heavy lifting is this? I've found a sample on how to generate WSDLs dynamically at this link, but there's a lot more to do beyond that and I don't want to bark up this tree if there are parts of the project that arn't feasible. Does anyone have any links, guides, books, or positive experiences trying this kind of thing?

    Read the article

  • How to Create a Simple Dictation Pad in Delphi2009+Vista

    - by XBasic3000
    the code are not so complecated.. private { Private declarations } SpSharedRecoContext1 : TSpSharedRecoContext; fMyGrammar : ISpeechRecoGrammar; procedure SpSharedRecoContext1Recognition(ASender: TObject; StreamNumber: Integer; StreamPosition: OleVariant; RecognitionType: SpeechRecognitionType; const Result: ISpeechRecoResult); procedure SpSharedRecoContext1Hypothesis(ASender: TObject; StreamNumber: Integer; StreamPosition: OleVariant; const Result: ISpeechRecoResult); procedure TForm1.FormCreate(Sender: TObject); begin SpSharedRecoContext1 := TSpSharedRecoContext.Create(self); SpSharedRecoContext1.OnHypothesis := SpSharedRecoContext1Hypothesis; SpSharedRecoContext1.OnRecognition :=SpSharedRecoContext1Recognition; fMyGrammar := SpSharedRecoContext1.CreateGrammar(0); fMyGrammar.DictationSetState(SGDSActive); end; procedure TForm1.SpSharedRecoContext1Recognition(ASender: TObject; StreamNumber: Integer; StreamPosition: OleVariant; RecognitionType: SpeechRecognitionType; const Result: ISpeechRecoResult); begin Memo1.Text := Result.PhraseInfo.GetText(0,-1,true); end; procedure TForm1.SpSharedRecoContext1Hypothesis(ASender: TObject; StreamNumber: Integer; StreamPosition: OleVariant; const Result: ISpeechRecoResult); begin Memo1.Text := Result.PhraseInfo.GetText(0,-1,true); end; My Problem, was the vista-OS voice command will intercept on my program. if i say "START", instead of writing start on memo1 it press the start menu on my desktop. or what ever command like START CANCEL EDIT DELETE SELECT etc. please help..... sorry for my english

    Read the article

  • Need help with wp_rewrite in a WordPress Plugin

    - by Brad
    Ok, I've got this code that I've been using to spit out news to an application of mine. It was working until today. I've cutout all the logic in the following code to make it simpiler. But it should "WORK" Can someone help me fix this code to where it works, and is done right? I know it's hacked together ,but it didn't seem to have any problems until today. I have not updated anything, don't know what the deal is. Plugin Name: MyPlugin Example Version: 1.0.1 if ( ! class_exists("MyPlugin") ) { class MyPlugin { var $db_version = "1.0"; //not used yet function init() { //Nothing as of now. } function activate() { global $wp_rewrite; $this-flush_rewrite_rules(); } function pushoutput( $id ) { $output-out =' The output worked!'; $this-output( $output ); } function output( $output ) { ob_start(); ob_end_clean(); header( 'Cache-Control: no-cache, must-revalidate' ); header( 'Expires: Mon, 26 Jul 1997 05:00:00 GMT' ); header( 'Content-type: application/json' ); echo json_encode( $output ); //Must encode this... } function flush_rewrite_rules() { global $wp_rewrite; $wp_rewrite-flush_rules(); } function createRewriteRules( $rewrite ) { global $wp_rewrite; $new_rules = array( 'MyPlugin/(.+)' = 'index.php?MyPlugin=' . $wp_rewrite-preg_index(1) ); if ( ! is_array($wp_rewrite-rules) ) { $wp_rewrite-rules = array(); } $wp_rewrite-rules = $new_rules + $wp_rewrite-rules; return $wp_rewrite; } function add_query_vars( $qvars ) { $qvars[] = 'MyPlugin'; return $qvars; } function template_redirect_intercept() { global $wp_query; if ( $wp_query-get('MyPlugin') ) { $id = $wp_query-query_vars['MyPlugin']; $this-pushoutput( $id ); exit; } } } } if ( class_exists("MyPlugin") ) { $MyPluginCode = new MyPlugin(); } if ( isset($MyPluginCode) ) { register_activation_hook( __file__, array($MyPluginCode, 'activate') ); add_action( 'admin-init', array(&$MyPluginCode, 'flush_rewrite_rules') ); //add_action( 'init', array(&$MyPluginCode, 'init') ); add_action( 'generate_rewrite_rules', array(&$MyPluginCode, 'createRewriteRules') ); add_action( 'template_redirect', array(&$MyPluginCode, 'template_redirect_intercept') ); // add_filter( 'query_vars', array(&$MyPluginCode, 'add_query_vars') ); }

    Read the article

  • mod_rewrite not working for a specific directory

    - by punkish
    This has got me completely foxed for a couple of days now, and I am convinced that I will look stupid once I solve it, but will be even stupider if I don't ask for help now. I have mod_rewrite working successfully on my localhost (no vhosts involved; this is my laptop, my development machine), and I use .htaccess in various directories to help rewrite crufty URLs to clean ones. EXCEPT... it doesn't work in one directory. Since it is impossible to reproduce my entire laptop in this question, I provide the following details. In my httpd.conf, I have mod_rewrite.so loaded. LoadModule rewrite_module modules/mod_rewrite.so In my httpd.conf, I have included another conf file like so Include /usr/local/apache2/conf/other/punkish.conf In my punkish.conf, I have directories defined like so DocumentRoot "/Users/punkish/Sites" <Directory "/Users/punkish/Sites"> Options ExecCGI AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/Users/punkish/Sites/one"> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> <Directory "/Users/punkish/Sites/two"> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> In ~/Sites/one I have the following .htaccess file RewriteEngine On RewriteBase /one/ # If an actual file or directory is requested, serve directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Otherwise, pass everything through to the dispatcher RewriteRule ^(.*)$ index.cgi/$1 [L,QSA] and, everything works just fine. However, in my directory ~/Sites/two I have the following .htaccess file RewriteEngine On RewriteBase /two/ # If an actual file or directory is requested, serve directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Otherwise, pass everything through to the dispatcher RewriteRule ^(.*)$ index.cgi/$1 [L,QSA] and, nothing works. Nada. Zip. Zilch. I just get a 404. I have determined that mod_rewrite is not even looking at my ~/Sites/two/.htaccess by putting spurious commands in it and not getting any error other than 404. Another confounding issue -- I have turned on RewriteLog in my httpd.conf with RewriteLogLevel 3, but my rewrite_log is completely empty. I know this is hard to trouble shoot unless sitting physically at the computer in question, but I hope someone can give me some indication as to what is going on. **Update: ** There are no aliases involved anywhere. This is my laptop, and everything is under the above stated Document Root, so I just access each directory as http://localhost/. Yes, typos are a big possibility (I did say that I will look stupid once I solve it, however, for now, I have not discovered a single typo anywhere, and yes, I have restarted Apache about a dozen times now. I even thought that perhaps I had two different Apaches running, but no, I have only one, the one under /usr/local/apache2, and I installed it myself a while back.

    Read the article

  • RackSpace Cloud Strips $_SESSION if URL Has Certain File Extensions

    - by macinjosh
    The Situation I am creating a video training site for a client on the RackSpace Cloud using the traditional LAMP stack (RackSpace's cloud has both Windows and LAMP stacks). The videos and other media files I'm serving on this site need to be protected as my client charges money for access to them. There is no DRM or funny business like that, essentially we store the files outside of the web root and use PHP to authenticate user's before they are able to access the files by using mod_rewrite to run the request through PHP. So let's say the user requests a file at this URL: http://www.example.com/uploads/preview_image/29.jpg I am using mod_rewrite to rewrite that url to: http://www.example.com/files.php?path=%2Fuploads%2Fpreview_image%2F29.jpg Here is a simplified version of the files.php script: <?php // Setups the environment and sets $logged_in // This part requires $_SESSION require_once('../../includes/user_config.php'); if (!$logged_in) { // Redirect non-authenticated users header('Location: login.php'); } // This user is authenticated, continue $content_type = "image/jpeg"; // getAbsolutePathForRequestedResource() takes // a Query Parameter called path and uses DB // lookups and some string manipulation to get // an absolute path. This part doesn't have // any bearing on the problem at hand $file_path = getAbsolutePathForRequestedResource($_GET['path']); // At this point $file_path looks something like // this: "/path/to/a/place/outside/the/webroot" if (file_exists($file_path) && !is_dir($file_path)) { header("Content-Type: $content_type"); header('Content-Length: ' . filesize($file_path)); echo file_get_contents($file_path); } else { header('HTTP/1.0 404 Not Found'); header('Status: 404 Not Found'); echo '404 Not Found'; } exit(); ?> The Problem Let me start by saying this works perfectly for me. On local test machines it works like a charm. However once deployed to the cloud it stops working. After some debugging it turns out that if a request to the cloud has certain file extensions like .JPG, .PNG, or .SWF (i.e. extensions of typically static media files.) the request is routed to a cache system called Varnish. The end result of this routing is that by the time this whole process makes it to my PHP script the session is not present. If I change the extension in the URL to .PHP or if I even add a query parameter Varnish is bypassed and the PHP script can get the session. No problem right? I'll just add a meaningless query parameter to my requests! Here is the rub: The media files I am serving through this system are being requested through compiled SWF files that I have zero control over. They are generated by third-party software and I have no hope of adding or changing the URLs that they request. Are there any other options I have on this? Update: I should note that I have verified this behavior with RackSpace support and they have said there is nothing they can do about it.

    Read the article

  • Can I do a URL Rewrite to a different Tomcat instance?

    - by RodeoClown
    Is is possible to use Tuckey's URL Rewrite to rewrite to a different Tomcat instance? I have it working using crossContext="true" rewriting to a different servlet on the same tomcat instance, but our production server has multiple tomcat instances running and I want to rewrite to one of them instead? If it's not possible using the URL Rewrite filter, is there another way of doing it? Thanks.

    Read the article

  • How do I identify which rewrite rule is being trigger on IIS 7.5?

    - by Jordan Reiter
    I have a set of rewrite rules (offhand, I would say around 40-50) for a given server. It's basically to handle and reroute mangled URLs so that bad links still go to where they're supposed to go. I've come across an URL that is redirecting and I can't figure out which rewrite rule it is applying. My background is Apache and in that case I'd simply enable a rewrite log and look at the logged output to figure out what was happening. Is there an equivalent way to do this in IIS? bonus round Any way for me to view & edit the rewrite rules in a text file rather than the GUI interface?

    Read the article

  • apache htaccess rewrite rules make redirection loop

    - by Ali
    Hi guys, Have a very strange problem with Apache .htaccess URL Rewriting and Redirection. Here's my setup: I have a zend application with a single point of entry (index.php) directly under my apache document root (call this the "public" folder). I also have all other public files (images, js, css, etc.) under the public folder. Here, I also have a wordpress blog under the "blog" folder. There's an empty test folder too The Problem When I go to mydomain.com/blog, I get redirected to http://www.theredpin.com/blog (correctly), then to http://www.theredpin.com/blog/ (just with an extra / at end), finally to http://theredpin.com/blog/ -- and we're back where we started. The loop continues. What I don't understand is why would wordpress try to remove the www? I'm guessing it's wordpress because my empty test folder acts just fine! PLEASE HELP. I"M REALLY DESPERATE :( Thank you very much Other things that happen: When I go to mydomain.com, i correctly get redirected to www.mydomain.com When I go to www.mydomain.com, i correctly stay where I am When I go to www.mydomain.com/test or mydomain.com/test, behaviour is correct. Setup So my .htaccess file does the following: If there's no www., then add it and do a 301 redirect. Here's the code I use RewriteCond %{HTTP_HOST} ^mydomain.com [NC] RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301] If the request is NOT for a resource (image, etc.), or the blog, then load zend application by rewriting to index.php RewriteRule !((^blog(/)?.*$)|(.(js|ico|gif|jpg|jpeg|png|css|cur|JPG|html|txt))$) index.php Thanks again for all your help!!! Ali

    Read the article

  • Rewrite rules for subfolders

    - by pg
    This may seem like a silly question but I can't figure it out. let's say I have a public_html folder with various folders like: Albatross, Blackbirds, Crows and Faqs. I want to make it so that any traffic to Albatross/faqs.php, Blackbirds/faqs.php, Crows/faqs.php etc will see the file that is at faqs/faqs.php?bird=albatross or faqs/faqs.php?bird=crows or what have you. If I go into the Albatross folder's .htaccess file I can do this RewriteRule faqs.php$ /faqs/faqs.php?cat=albatross[QSA] Which works fine, but I want to put something in the top level .htacces that works for all of them, so tried: RewriteRule faqs.php$ /faqs/faqs.php?cat=albatross[QSA] RewriteRule /(.*)/faqs.php$ /faqs/faqs.php?cat=$1 [QSA] and even RewriteRule /albatross/faqs.php$ /faqs/faqs.php?cat=albatross [QSA] and various others but nothing seems to work, when I go to http://www.birdsandwhatnot.com/albatross/faqs.php I see the same file the same way it's always been. Does the presence of an .htaccess file in the subfolder conflict with the higher up .htaccess file? Am I missing something?

    Read the article

  • Zend Framework subdomain+subfolder router rewrite problem

    - by zf_novice
    I'm new to Zend Framwork and this is an issue I've been struggling for several hours already... I'm trying to chain Hostname and standard Route in order to get url with subdomain+subfolders ie.: http:// lang.mydomain.com/myapplication/public/controller http:// lang.mydomain.com/myapplication/public/controller/action (sorry for the empty space in the address, this site won't allow links) Basically what I have done in Bootstrap is: // add language to default route $routePath = new Zend_Controller_Router_Route( ':controller/:action/*', array('controller'=>'index','action' => 'index','module'=>'default') ); $routeHostname = new Zend_Controller_Router_Route_Hostname( ':lang.mydomain.com', array('lang'=>$lang) ); $frontController = $this->getResource('FrontController'); $router = $frontController->getRouter(); $router->addRoute('default', $routeHostname->chain($routePath)) $frontController->setRouter($router); it finds the route ok, but every time I generate url in view or layout by $this-url() <?php echo $this->url( array( 'controller'=> 'guestbook', 'action' => 'sign', 'lang' => Zend_Registry::get('lang'), ), 'default', true) ?>"> I get http:// lang.mydomain.com/controller instead of http:// lang.mydomain.com/myapplication/public/controller I've been trying to set baseUrl on front controller but no luck... Also I've tried the static route with myapplication/public or following standard route: 'myapplication/public/:controller/:action/*' - it result with "An error occurred Page not found Exception information: Message: No route matched the request" and empty request Is there any way to assembly subdomain with subfolder in Zend Framwork?? EDIT: I changed above to: $frontController->setBaseUrl('.'); // add language to default route $routePath = new Zend_Controller_Router_Route( 'quickstart/public/:controller/:action/*', array( 'controller'=>'index', 'action' => 'index', 'module'=>'default', ) ); and it works form me, although I'm not sure whether it's been correct approach...

    Read the article

  • Can you review my Perl rewrite of Cucumber?

    - by Evgeny
    There is a team working on acceptance testing X11 GUI application in our company, and they created a monstrous acceptance testing framework that drives the GUI as well as running scenarios. The framework is written using Perl 5, and scenario files look more like very complex Perl programs (thousands of lines long with procedural-programming style) than acceptance tests. I recently learned Ruby's Cucumber, and generally have been using Ruby for quite a lot of time. But unfortunately I can't just shove Ruby to replace Perl because the people who are writing all of this don't know Ruby and it's quite certain that they wont want "this" kind of interruption. So to bring Ruby's Cucumber a bit closer to their work, I rewrote it using Perl 5. Unfortunately I am really not a Perl programmer, and would love to get a code review and to hear suggestions from people who both know Perl and Cucumber. Hi Perl/Cucumber StackOverflow users - please help me create this "open source" attempt to re-create Cucumber for Perl! I would love to hear your comments and will accept any acceptable help. The minimal source code is here: http://github.com/kesor/p5-cucumber Thank you for your attention. For those not familiar with cucumber - please take just one small moment to take a look at this one small little page: http://wiki.github.com/aslakhellesoy/cucumber

    Read the article

  • Help with route rewrite in asp.net mvc

    - by NachoF
    Im having a really hard time understanding routing. Please help me with this problem. Each of my controllers have these three actions right now Users have Index, Create and Edit Locations have Index, Create and Edit Companies have Index, Create and Edit The thing is, it all gets done through ajax. I have jquery ui tabs with two tabs for each, Create and Edit So the Index method is always the one that gets called for action links. and inside this main view is that you can call(by clicking on the tab icon) the other methods that return an ajax view that gets output into the jqeury tab (I hope thats clear) I have a sidebar with links to the controllers. and to specific methods of these controllers. The wanted behavior is that it should actually go into the Index Method and then with some logic autoload the wanted tab. It all works just fine right now. But my urls are horrible. To get to the create method for Users I have to go this url http://localhost/Users/Index/1 http://localhost/Users/Index/2 I want the behavior of these links to be remapped to these links http://localhost/Users/Create http://localhost/Users/Edit So even though it seems as if you are calling the Create method of the controller you are actualling always calling the Index Method.... (I know how to transform Create into "1" and Edit into two, so dont worry about that part Hope thats clear. Thanks in advance Edit: Just realized that this might not be possible cause then when I actually need to call the methods (with ajax) it wont know what to do.... am I correct?

    Read the article

  • Catching url in htaccess rewrite condition

    - by Rickard
    Hi! I got this url /search/renttype-all.place-all.type-all.bedrooms-all.0.0/ I want to get the text after the second "/" and the third "/". The URL can end at the third "/" or go on with more text and "/". I have been trying with a lot of rules but never got any to work. My last try was RewriteRule ^search/(.+)/$ index.php?Search=0&Arg=$1 [NC] RewriteRule ^search/(.+)/(.+)$ index.php?Search=0&Arg=$1 [NC] Anyone that can show me how to make a rule that works? :) Thanks for reading my question!

    Read the article

  • Problem with Japanese/International Characters with IIS7 URL Rewrite

    - by percent20
    I have a friend with a Japanese blog, using wordpress, he has the pretty url. Basically domain.com/postname. Well an example of a url might be. "domain.com/???". His blog is hosted on an Apache web server. I am running IIS7 and am trying to get my Japanese blog going like it should, and have "domain.com/???" show just that one post when you visit that url. My thinking is it has something to do with url-encoding. I can't find too much information on utf-8 or anything about getting international characters to work in a url. Any help on this would be great. I am thinking I should change something in the web.config file, but not to sure. I haven't had a lot of experience with IIS7. Thanks.

    Read the article

  • Why rewrite directive causes "301 Moved Permanently" with Nginx?

    - by Desmond Hume
    Below is a much simplified version of what I have in the configuration file of a server run by Nginx 1.2.5, yet it causes 301 Moved Permanently with Location: http://example.com/phpmyadmin/ before serving data, which is not what I expected from the default behavior of the rewrite directive. server { listen 80; location /pma { rewrite ^ /phpmyadmin; } location /phpmyadmin { root /var/www; index Documentation.html; } } When I follow http://example.com/pma, the data is served but the URL in the browser is changed to http://example.com/phpmyadmin/ while it was supposed to stay http://example.com/pma. How do I avoid Nginx sending 301 Moved Permanently so that it doesn't expose the actual directory structure on my server?

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >