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
https://forums.phpfreaks.com/topic/38199-solved-redirect-without-mod_rewrite/
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.

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.