Hi everybody,
I'm developping a mini-social website in PHP.
For each user, a public web page can initially be viewed at
an address like this: http://www.mysocialwebsite.com/index.php?q=username .
So, i would like to know:
- which rules can be used to transform the address http://www.mysocialwebsite.com/index.php?q=username
to http://www.mysocialwebsite.com/username ?
- If it's possible, how Google will index the resulted address http://www.mysocialwebsite.com/username ?
Should i care about indexation?
Thank you.
Regards.
About url rewriting et indexation
Moderator: General Moderators
Re: About url rewriting et indexation
It's kinda funny... half of the whole point of doing things like that is so that search engines give you better rankings for smarter-looking links...
You should reconsider using /username as the pattern. What about accounts named "images" or "admin"?
You should reconsider using /username as the pattern. What about accounts named "images" or "admin"?
Re: About url rewriting et indexation
Thanks for your reply ...tasairis wrote:It's kinda funny... half of the whole point of doing things like that is so that search engines give you better rankings for smarter-looking links...
You should reconsider using /username as the pattern. What about accounts named "images" or "admin"?
is there another alternative to that?
( I'd like to do like Facebook did recently: all users have a personalized link: http://www.facebook.com/username)
Regards.
Re: About url rewriting et indexation
The other common one is /~username.
For Facebook, what if someone had a username of "pages"?
But whatever.
For Facebook, what if someone had a username of "pages"?
But whatever.
Code: Select all
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/?$ index.php?q=$1Re: About url rewriting et indexation
Thanks for your quick reply ...tasairis wrote:The other common one is /~username.
For Facebook, what if someone had a username of "pages"?
But whatever.Code: Select all
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/?$ index.php?q=$1
so this piece of code is for the URL Rewriting part.
Can google manage to index the generated url?
Regards.
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: About url rewriting et indexation
Google will endex whatever shows in the address bar. the rewriting is executed at server level.
Re: About url rewriting et indexation
Ok,
i'll try these solutions ...
Thanks again.
i'll try these solutions ...
Thanks again.