FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


mod_rewrite





thnn
Is mod_rewrite installed in the server?
n0obie4life
Yes.
eugenioclrc
how i can activated the mod_rewrite?!?!?! i have to upload the .htacces file?... i am a bit confused...
does google index correctly the pages hosted by frihost or only index the principal page?
n0obie4life
Firstly, if you don't even know what's mod_rewrite, don't use it. It'll just cause you to get 500 internal errors, which you hate.
Bondings
eugenioclrc wrote:
how i can activated the mod_rewrite?!?!?! i have to upload the .htacces file?... i am a bit confused...
does google index correctly the pages hosted by frihost or only index the principal page?

Most websites don't need a mod_rewrite. It's not easy to make if you don't know anything about it. And yes, it should be used in .htacess files. Normally google perfectly indexes your site without a mod_rewrite.
Daniel15
mod_rewrite is really useful, if you learn how to use it. It allows you to get rid of query strings (eg. ?page=test) and instead have a virtual directory tree.

My DanSoft Australia website has URL's like http://www.dansoftaustralia.net/index.dsa, http://www.dansoftaustralia.net/products.dsa, http://www.dansoftaustralia.net/about.dsa, etc. but all these pages are served up using a single index.php file (which implements a custom templating system)

Anyway, to enable it, you need to add this to the .htaccess file:
Code:
RewriteEngine on


See Here for more information on mod_rewrite, including how to use it.
shabda
Quote:
Firstly, if you don't even know what's mod_rewrite, don't use it. It'll just cause you to get 500 internal errors, which you hate.

Sometime it can be used without knowing a thing about its internal working. Like I am using joomla, and it just needs one minute to set it up to use mod rewrite.
And though googl;e indexes with ? in url, why take chances? Hey even frihost uses it(can u see a url in forum with vt-xxxx in it?)
Bondings
shabda wrote:
Quote:
Firstly, if you don't even know what's mod_rewrite, don't use it. It'll just cause you to get 500 internal errors, which you hate.

Sometime it can be used without knowing a thing about its internal working. Like I am using joomla, and it just needs one minute to set it up to use mod rewrite.
And though googl;e indexes with ? in url, why take chances? Hey even frihost uses it(can u see a url in forum with vt-xxxx in it?)

Google doesn't like the parameters after a url, certainly not session id's. It does index them, but not as good as normal php/html pages.
Daniel15
Bondings wrote:
shabda wrote:
Quote:
Firstly, if you don't even know what's mod_rewrite, don't use it. It'll just cause you to get 500 internal errors, which you hate.

Sometime it can be used without knowing a thing about its internal working. Like I am using joomla, and it just needs one minute to set it up to use mod rewrite.
And though googl;e indexes with ? in url, why take chances? Hey even frihost uses it(can u see a url in forum with vt-xxxx in it?)

Google doesn't like the parameters after a url, certainly not session id's. It does index them, but not as good as normal php/html pages.


Just a question, does Google like weird extensions? My website uses .dsa extensions (something I made up) which works in conjunction with mod_rewrite. For example, the file /products.dsa would actually go to /index.php/products
shabda
Quote:
Just a question, does Google like weird extensions?

Yes. Seen many sites with weird extensions indexed by goog. But why take chances?
Bondings
daniel15 wrote:
Just a question, does Google like weird extensions? My website uses .dsa extensions (something I made up) which works in conjunction with mod_rewrite. For example, the file /products.dsa would actually go to /index.php/products

Google has a set of file names which it is able to index officially. However, I already heared from a lot of people that it indexes every file extension and only looks at the content of the page(html, pdf, ...).

But the best way to check this is just to check wether google indexed those pages or not and if they appear in the google index.
n0obie4life
Google index my website which has an extension of .bondings Rolling Eyes.

So...

Oh btw, daniel15, I would like to know that how did you make it show index.dsa instead of index.php. I can't seem to get that Sad
Daniel15
Well, /index.dsa actually goes to /index.php/index

The original URL's were like /index.php/index, /index.php/products, etc. The PHP scripts use $_SERVER['PATH_INFO'] to get the path info (/index, /products, etc. Basically, the thing after /index.php) and uses that to get the correct page.

My .htaccess is:
Code:

RewriteEngine on
RewriteRule ^(.+).dsa$ index.php/$1 [L]

(.+) means "one or more characters" and $1 is the string obtained in the brackets. So, the rule means "if the URI is anything followed by .dsa, get the portion before the .dsa and go to /index.php/ followed by the string.

Hopefully, you understand that. It was a bit hard for me to explain.
Related topics
Does frihost have mod_rewrite?
.htaccess i mod_rewrite
mod_rewrite in Apache and how does it work?
.htaccess instead of mod_rewrite
[SOLVED] Using mod_rewrite.
only .htaccess instead of mod_rewrite
problema con el mod_rewrite en wmserver 3.3
75FRIH$ Mod_Rewrite Code
mod_rewrite
mod_rewrite - jak sie tego uzywa ? i czy mamy to na frihost
Can you target a <div> like a frame?
URL Cloaking / mod_rewrite advice needed
Is mod_rewrite enabled?
Apache mod_rewrite
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.