View Full Version : mod rewrite
hi
does anyone know.. whats mod rewrite ? i know its very usefull to create search engine friendly urls
lets discuss it..
Although, I havent tried doing this. I know that it is a way that makes dynamic page urls (i.e. http://www.domain.com/page.php?act=search&page=126) into static pages like for example into this http://www.domain.com/pages/search/126.html instead of the dynamic php page which is not crawled properly or never crawled by the SE spiders.
This is what I know about mod rewrite. If this is a mistake let me know. Thanks. :cool:
bes island
01/24/2005, 02:27
mod_rewrite is a feature of Apache and probably some other HTTP servers. Let you have php script that lists some products' details, say, aaa.bbb.com/product.php?id=113
Most search engines will not rate the pages for each product.
But if you use mod_rewrite, it will be some kind of URL alias, say,
aaa.bbb.com/products/113.html
will redirect to
aaa.bbb.com/product.php?id=113
- but redirect internally, aaa.bbb.com/products/113.html will still be shown in address bar, so, search engines will rate each product's page. That's it.
P.S. I guess, ScriptLance uses mod_rewrite for projects' pages.
http://www.scriptlance.com/projects/PROJECTSNUMBER.shtml
is the mod_rewrite redirect to something like http://www.scriptlance.com/projects.cgi?p=PROJECTSNUMBER
(I had correct URL some months ago but unfortunately lost it)
i know this can be done vai mod rewrite.. but how? i dont know
it may be something like this.. we have to edit .htaccess
RewriteEngine On
RewriteRule ......
Hi, DCM. I can help you, if you wish.
Just talk to me in MSN :)
Won`t it be gr8, if you can explain it here only..So that all can know.
hope you will consider doing this favour. coz then only in future, you can expect to find solution to your small or medium problems here without even asking and waiting for.
Rest is upto you.
thanx n cheers,
regards, ;)
Won`t it be gr8, if you can explain it here only..So that all can know.
hope you will consider doing this favour. coz then only in future, you can expect to find solution to your small or medium problems here without even asking and waiting for.
Rest is upto you.
thanx n cheers,
regards, ;)
yeah it will be better..
Well, DCM, I can not post my contacts here, remember? :)
About the mod_rewrite you can see here:
http://www.fluidthoughts.com/howto/mod_rewrite/
A quite simple doc for a beginner.
Any questions - please ask!
Well, DCM, I can not post my contacts here, remember? :)
About the mod_rewrite you can see here:
http://www.fluidthoughts.com/howto/mod_rewrite/
A quite simple doc for a beginner.
Any questions - please ask!
yup sorry for that.. i am so dumbed..
thanks a lot for that link.. i will check it out
abhigyan
01/26/2005, 08:06
Hi all,
Great article on mod_rewrite by skiv. Is there a similar article on aspor .net?
Regards,
Abhigyan
stonedsage
02/05/2005, 03:42
I've had better luck playing with php's argument processing .. i.e. look for / instead of ? or & .. also really helps when dealing with w3c validation (ampersands in links / etc).
I have a server with a ton of resource hogging affiliate engines. I cut load averages noticeably doing it that way as well.
Note - make sure you dont defeat protection in existing code to stop SQL injection (and other malformed url) attacks when changing things around :)
bes island
02/05/2005, 11:30
BTW... I wonder... (probably, somebody knows...) does Google(tm) treat such urls:
http://aaa.bbb.ccc/bla/bla/bla.php/xxx/yyy/zzz/
http://aaa.bbb.ccc/bla/bla/bla.php/ppp/qqq/rrr/
like different urls? I.e. does Google(tm) recognize the actual script name (http://aaa.bbb.ccc/bla/bla/bla.php) or it thinks it is the subdirectory of /bla/bla/ named bla.php and its subdirectories xxx and ppp?
stonedsage
02/06/2005, 00:17
Google pulls the mime type from the page, but it does see the individual file name .. all spiders do.
what google has a hard time distinguishing is something like
view.php?product=10 ... it would treat that as one page.
so products/view/10 ... good (most of mine fly just like that)
combine with rewrite to make that products/view/10.html (best)
Imho anyway. I've been playing with various methods for years. google has a simple, but huge boolean brain. 10 Million on a reduced instruction cluster make it possible :)
Its also goood to mix it around so your site is not using url's like another.
Say you sold widgets ...
products/widgetcatalog/10 is what you could pass to widgets which apache knows via .htaccess to parse as x-httpd-php. Play with rewrite or even pass useless arguments *just* to make your url's unique. Google checks how the url is formed as part of its relevency rank. So you're either a good score for widgets or just another osc site, according to how (i've) seen google think.
hth :)
Am I the only person, who likes to use mod_mime aswell?
Well, I used it once, but I only know about it, because you told me about it.
I use it all the time. Spidering/indexing isn't issue at all - most of crawlers are just fine with good,old dynamic URLs (except for session_id), however for SEO purposes mod_rewrite is very valuable.
what google has a hard time distinguishing is something like
view.php?product=10 ... it would treat that as one page.
so products/view/10 ... good (most of mine fly just like that)
combine with rewrite to make that products/view/10.html (best)
I'm affraid I have to disagree. As far as google is concerned (and all the other major players), there is no difference between view/php?product=10 and product/view/10/, and absolutely no difference between product/view/10/ and product/view/10.html
Only benefit is SEO and perhaps usability. Users can easily "remember" mod_rewrite URLs for direct accessing.
One negative aspect of this approach is Google PR value, since product/view/10/ page is considered "2 directories down" and initially awarder with lower PR than it would be if it is one-level down, for example. But who cares about PR anymore :D
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.