homepage Welcome to WebmasterWorld Guest from 54.204.127.59
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
mod_rewrite, convert URI to a GET-String
st2xo




msg:1503015
 2:38 pm on Sep 17, 2002 (gmt 0)

Hi,

Im searching for a mod_rewirte rule to:

[domain.com...] -> [domain.com...]

Because I need these GET-string-parameters at any time, I cant use the Alias directive in the httpd.conf.

Of course there will be no directory named "foo" ... also there is no trailing slash problem at this server ...

Im not very familiar with regex and/or mod_rewrite, the apache docs and google results had not helped me, so I like to ask here ....

could anybody help? Thanks a lot!

Stefan

 

andreasfriedrich




msg:1503016
 4:08 pm on Sep 17, 2002 (gmt 0)

It took some serious searching to find this one since RewriteRules are extremely shy creatures indeed. ;)

internal rewrite
RewriteEngine On
RewriteRule ^(.*) xyz.php?abc=$1 [L,QSA]

external redirect
RewriteEngine On
RewriteRule ^(.*) [domain.com...] [R,L,QSA]

jatar_k




msg:1503017
 5:00 pm on Sep 17, 2002 (gmt 0)

Welcome to WebmasterWorld [webmasterworld.com] st2xo

st2xo




msg:1503018
 6:31 pm on Sep 17, 2002 (gmt 0)

Hi Andy,

Nooo, they are not shy to be found, they are living to thousands, but, shame on me, Ill lose my head if I see regex more complex than to extract some chars :)

Thank you, the internal regex works fine!

Stefan

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved