John Sladek on 13 May 2008 16:59:34 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] regex question - solved


Found something that seems to work..

RewriteRule ^([^/\.]+)/?$ /public.php?url=$1


John


Subject: [PLUG] regex question


> Hello,
>
> I'm new to regex and I am trying to use it with mod_rewrite.  There is 
> tons
> of stuff out on the web but I figured someone here might be able to get 
> this
> answered quicker than I can find it on my own.
>
> I'm trying to detect a url like this
>
> http://www.mysite.com/anything
>
> but not this
>
> http://www.mysite.com/anything.php
>
> I figure the rewrite rule will just look for the absence of a . (dot)
> between the filename and the extention
>
> I'll then be rewriting from
>
> http://www.mysite.com/anything
>
> to
>
> http://www.mysite.com/public.php?page=anything
>
> The Search begins...
>
> TIA,
> John
>
>
>
> ___________________________________________________________________________
> Philadelphia Linux Users Group         --  
> http://www.phillylinux.org
> Announcements - 
> http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  --  
> http://lists.phillylinux.org/mailman/listinfo/plug
> 


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug