Jump to content

[SOLVED] Redirect without mod_rewrite


Lumio

Recommended Posts

Hello!

 

I'm writing a community where users can create theire own websites.

the websites get saved in ./web/[username]/

Every user has also his own userpage. So if you get to [username].mydomain.com/ you come to his userpage.

BUT: He also can set up his userpage to redirect his own website. So if you get to [username].mydomain.com/ you actually get to mydomain.com/web/[username]/

But I want that the adressbar shows [username].mydomain.com/

 

How can I do that?

Link to comment
Share on other sites

I'm sorry you missunderstood me .... my fault

 

I already did that... so if is say lumio.mydomain.com it goes to my userpage. But when I want to set up the option to redirect to my personal website... I don't know how to do that.

 

I also told that problem in another board. They told me to write a .htaccess with all redirects. So if one user sets it up to redirect to his website, the script should write it into the .htaccess.

 

But I'm not happy about that. I'm looking for another solve.

Link to comment
Share on other sites

yep... I think I found a way to do that as easy as you can. :D

 

I though about a function that gives me the content-type of a file.

So if someone requests the url lumio.mydomain.com/myfile.html the file get back to index.php

index.php reads the whole url and reads the file /lumio/myfile.html

And mime_content_type() is giving me the mime-type of myfile.html :D

 

Yeah :D

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.