| :: |
| Author |
Message |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
Posted: Sat Dec 16, 2006 8:10 am Post subject: How do SEs see 404 redirection |
|
|
Hi,
In my site I have given my members an option to have a customized url like -www.mysite.com/membername
Now for each member I create a folder "membername" with his images in that. Since there is no index.php ( or similar ) file in that folder, it creates 404 error when someone visits this url and I use this 404 error to redirect or create a page for that user.
Now my question is, how do Search Engines see this redirection from 404. Will this effect SE rankings etc for that page or for that matter will I be able to list www.mysite.com/membername url in SERPs ? |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India |
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14327
|
Posted: Sat Dec 16, 2006 12:34 pm Post subject: Re: How do SEs see 404 redirection |
|
|
404 are understood as 404 by bots, so every time the http header will 404 bots will "think" the page really does not exist, even though they'd be able to read and follow links they'd find on a personal 404 page.
According to what you say, you could try the following :
use a special and non existing folder to filter cases like users/ to end up with -www.example.com/users/membername, so that you could use mod rewrite in a simple way to have those working.
| Code: | | RewriteRule ^users/([0-9a-zA-Z-]+)$ /script.php?var=$1 [QSA,L] |
where the script.php would be your file used to build the page and var the username sent to the script.
Doing like this would be handy to have a fast RegEx (the user/ folder helps out filtering cases). The only matter is everything will the the exact same as if you'd have a real folder names users/, so even though the page would be built from root (script.php), you'll need to avoid relative path in your final html output, since browser will really believe in the users/ folder
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
Posted: Tue Dec 19, 2006 6:45 am Post subject: Re: How do SEs see 404 redirection |
|
|
Well, I agree but I already have members who are using urls like -www.site.com/member I cannot change this now.
Is there any other way I can do it.
At present I use
| Code: | $referer=$_SERVER['REQUEST_URI'];
list($none, $fol,$pg) = split ('[/]', $referer); |
on my 404.php page to get the member's page requested for and then redirect to another page that creates members home page.
I have a table in database that stores which members have which urlname.
e.g -www.site.com/abc then I can check if "abc" exists as url for some member or not. If it exists I can use htaccess to redirect it appropriately otherwise it opens the path without any redirection.
Cannot I use htaccess to do this redirection ? |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14327
|
Posted: Tue Dec 19, 2006 9:11 am Post subject: Re: How do SEs see 404 redirection |
|
|
Well, the thing is you cannot access sql data in .htaccess.
You could try with this rewriterule if you don't want to add a folder level :
| Code: |
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9a-zA-Z-]+)$ /script.php?var=$1 [QSA,L] |
At the very en d of your .htaccess, because this one will basically match everything without dots.
Where script.php would do the same job as you custom 404 page, but with proper header sent.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
Posted: Tue Dec 19, 2006 9:23 am Post subject: Re: How do SEs see 404 redirection |
|
|
| Thanks I will try this and report. |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India |
|
| Back to top |
|
 |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
Posted: Tue Dec 19, 2006 9:45 am Post subject: Re: How do SEs see 404 redirection |
|
|
Ok its working but there is a slight problem.
When I open -www.site.com/member it works fine but when I open -www.site.com/member/ it doesnot open. Pls note the last trailing slash.
Also how do I test the headers, I mean how can I test if its working thru htaccess or my other script. I can delete my older script but still I wud like to have some other method in which I can see headers being sent. |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India
Last edited by nims on Tue Dec 19, 2006 9:49 am; edited 1 time in total |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14327
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14327
|
|
| Back to top |
|
 |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
Posted: Tue Dec 19, 2006 11:32 am Post subject: Re: How do SEs see 404 redirection |
|
|
Great works perfect !!!  |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India |
|
| Back to top |
|
 |
|
|