Closed Thread Icon

Topic awaiting preservation: Mod Rewrite (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=21396" title="Pages that link to Topic awaiting preservation: Mod Rewrite (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Mod Rewrite <span class="small">(Page 1 of 1)</span>\

 
Trigger
Paranoid (IV) Inmate

From:
Insane since: Jun 2002

posted posted 04-16-2004 18:44

Assuming my domain is the-bronz.me.uk is it possible to have

username.the-bronze.me.uk
point too
http://the-bronze.me.uk/scriptdata/index.php?person=username

so basicaly 'dynamicly' haveing subdomains? using Mod rewrite or some other 'built' in apache thingy?

I was just wonder.. if so could some one explain how I'd implment?

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 04-16-2004 18:48

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Trigger
Paranoid (IV) Inmate

From:
Insane since: Jun 2002

posted posted 04-16-2004 19:23

ok I found a slight solution

code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^.]+)\\.example\\.com$ [NC]
RewriteCond %1 !^www$ [NC]
RewriteRule ^$ /index.php?id=%1 [L]



My current issue, still standing is,

code:
RewriteEngine On
RewriteRule ^/([^/]+)/?$ /sendmessage.php?touser=$1 [L]


fails to work, I simplye want /steven
to call sendmessage.php?touser=steven

but it fails to do so, and sends me off some where else.. any ideas?

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 04-17-2004 19:04

yeah... what's the ? supposed to do in your regexps? and what about the final /, right before the?
Ah... optional, I guess. - I'd try it without it and then use {0,1} - and check your apache log, for wether it records something funny with your regexps.

Oh, and check if the first / is actually passed to the rewrite rule..
yourdomain.com/steven might turn out to be just 'steven' in the rewrite rule. (I'm pretty certain that my apache does it that way).

« BackwardsOnwards »

Show Forum Drop Down Menu