Forum Moderators: phranque

Message Too Old, No Replies

.htaccess problem

redirect all sub-folders but keep the same link

         

pedro889

12:59 am on Oct 27, 2011 (gmt 0)

10+ Year Member




hello.

So my site will have users, each user will have pages, like:
site.com/user1/page1
site.com/user2/page3

all folders/files must go do site.com/index.php.
(without loop ^^)

but even redirecting everything to site.com/index.php, when a user goes to site.com/user4/page3, the URL must stay the requested (site.com/user4/page3).

therefore, its best for the user, and i can process the requested URL in PHP, and manage the request.

so i will have nice url's, and will be easier for me to develop.

lucy24

4:09 am on Oct 27, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Happily for you, the redirect-plus-rewrite two-step that you describe seems to be the Fashion of the Hour. That is, make the browser's address bar look pretty,* but serve content from the "real" location, no matter how long and convoluted it is.

So if you search this Forum you will quickly find several dozen posts describing how to address the situation.


* Do not ask how this fits in with the equally common assertion that users don't look at the URL.