Re: URL problem

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 68415
interpreted = N
texte = Thanks, Tom I need to rewrite any URL containing an underscore (_) and without an extension (tpl|gif|jpg|png|css|ico) so that it lands on index.tpl and passes the original requested URL to index.tpl. Will this work? RewriteEngine On RewriteCond %{REQUEST_URI} !index\.tpl RewriteCond %{REQUEST_URI} !\.(tpl|gif|jpg|png|css|ico) RewriteRule ^_ /index.tpl?requestedurl=%{REQUEST_URI} [L] On Feb 5, 2007, at 1:56 AM, Tom Duke wrote: > Pat, > > Yes the 'parser.tmpl' file is in the site root. > > Regarding the .htaccess file - I am not a mod_rewrite expert and it > took > me some time to get the syntax of my one correct. You'll really > have to > experiment. The basic structure is:- > > > RewriteEngine On > << Turn the rewrite engine on >> > > RewriteRule ^admin/.*$ - [L] > << Exclude any URLs beginning with 'admin/' i.e. the admin directory - > the [L] means that this is the last rule that will be applied >> > > RewriteCond %{REQUEST_URI} !parser\.tmpl > << Do not rewrite the file 'parser.tmpl' >> > > RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico) > << Do not rewrite files with the specified suffixes >> > > RewriteRule ^(.+)$ /parser.tmpl?requestedurl=%{REQUEST_URI} [L] > << Rewrite everything else and send the url as a variable called > '[requestedurl]' >> > > > - Tom > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to digest@talk.smithmicro.com> > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: URL problem ( Pat McCormick 2007)
  2. Re: URL problem ( Donovan Brooke 2007)
  3. Re: URL problem ( "Dan Strong" 2007)
  4. Re: URL problem ( Pat McCormick 2007)
  5. Re: URL problem ( "Tom Duke" 2007)
  6. Re: URL problem ( Pat McCormick 2007)
  7. Re: URL problem ( Stuart Tremain 2007)
  8. Re: URL problem ( Pat McCormick 2007)
  9. Re: URL problem ( Pat McCormick 2007)
  10. Re: URL problem ( Pat McCormick 2007)
  11. Re: URL problem ( "Tom Duke" 2007)
  12. Re: URL problem ( Stuart Tremain 2007)
  13. URL problem ( Pat McCormick 2007)
  14. Strange variable in url problem... (Jimmi Kristensen 2001)
Thanks, Tom I need to rewrite any URL containing an underscore (_) and without an extension (tpl|gif|jpg|png|css|ico) so that it lands on index.tpl and passes the original requested URL to index.tpl. Will this work? RewriteEngine On RewriteCond %{REQUEST_URI} !index\.tpl RewriteCond %{REQUEST_URI} !\.(tpl|gif|jpg|png|css|ico) RewriteRule ^_ /index.tpl?requestedurl=%{REQUEST_URI} [L] On Feb 5, 2007, at 1:56 AM, Tom Duke wrote: > Pat, > > Yes the 'parser.tmpl' file is in the site root. > > Regarding the .htaccess file - I am not a mod_rewrite expert and it > took > me some time to get the syntax of my one correct. You'll really > have to > experiment. The basic structure is:- > > > RewriteEngine On > << Turn the rewrite engine on >> > > RewriteRule ^admin/.*$ - [L] > << Exclude any URLs beginning with 'admin/' i.e. the admin directory - > the [L] means that this is the last rule that will be applied >> > > RewriteCond %{REQUEST_URI} !parser\.tmpl > << Do not rewrite the file 'parser.tmpl' >> > > RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico) > << Do not rewrite files with the specified suffixes >> > > RewriteRule ^(.+)$ /parser.tmpl?requestedurl=%{REQUEST_URI} [L] > << Rewrite everything else and send the url as a variable called > '[requestedurl]' >> > > > - Tom > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to digest@talk.smithmicro.com> > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Pat McCormick

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Sorting by date (1997) old problem (2001) Pithy questions on webcommerce & siteedit (1997) [WebDNA] Anyone using version 6.2.1 in production on linux (2013) More on the email templates (1997) Security Issues and WebCommerce Solution (1997) Add more fields to an existent data base (1997) Re:mail list (1998) [ShowIf] a either fields are blank (1998) Logical and or in [hideif] (1997) [WebDNA] Sendmail Problems (2008) problems with 2 tags (1997) WebCatalog on Mac AIX box (1998) Mystery authentication (1997) [OT] PHP?MySQL Help Needed (2003) WebCatalog for Mac 2.0.1 Released (1997) Nested tags count question (1997) Dates (1996) MacActivity and PCS (1997) More questions about serial number dishing (1997)