This is a discussion on "mod rewrite basics shared hosting" within the PHP Forum section. This forum, and the thread "mod rewrite basics shared hosting are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
mod rewrite basics shared hosting
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
mod rewrite basics shared hosting
I've been deploying a technique for using search engine friendly urls where a 404 error page handles requests and includes the appropriate files. However, I've been finding that some people (seemingly at random) get sent 404 errors. I'm guessing this might be to do with php sending 404 headers before sending the page content.
I've also learned that google is not indexing all of the pages. My urls look like this:
At any rate I wondering if I actually need to use genuine mod re-writes. But I can't find where to start. I am on shared hosting so I cannot edit the php.ini or httpd.conf files. Is this still possible? Where do I start? Does anybody know some simple starter tutorials for mod-rewrites? |
|
|
|
|||
|
Re: mod rewrite basics shared hosting
The rewrite stuff is probably handled via .htaccess files in your web directory - although you should ask your hosting company.
|
|
|||
|
Re: mod rewrite basics shared hosting
I have a working htaccess file for handling the default page and the 404 document. Does this mean that I have everything I need to work with mod rewrites? Does it mean that the mod rewrite engine is 'on', or is there anything else I need to configure?
What do I need to start writing in my htaccess file? Can you supply some sample code or point me to a tutorial? As I say, most of the tutorials I find seem to infer that I need to change server files that I don't have access to on shared hosting... |
|
|||
|
Re: mod rewrite basics shared hosting
OK, well i've googled
"php mod rewrite shared hosting tutorial" and I get this: http://www.devshed.com/c/a/Apache/Se...h-mod-rewrite/ It says I "need to have access to setting some options up in your httpd.conf or at least have a server admin who's willing to do it for you". I haven't looked into the tutorial that closely yet, but am I likely to be able to make the necessary settings in my php pages? If I run a phpinfo(), what should I look for to establish if the server is set up correctly? |
|
|||
|
Re: mod rewrite basics shared hosting
I think I've found it...
http://www.workingwith.me.uk/article...ng/mod_rewrite |
|
|||
|
Re: mod rewrite basics shared hosting
Success! This tutorial is really great I've managed to get it working already. One last question: I'm concerned about the fact that google hasn't indexed my page. The URL looks like:
www.domain.com/products/My+Product+Name Do you think that the url was not indexed because of the old technique of using the 404 error page to handle the request? What are my chances that the htaccess mod rewrite technique will fix this problem? Or are the urlencoded spaces and capitals a problem? Is there a quick way to find out if google can see my pages now, or do I have to wait (I don't want to wait and then find I still have a problem). |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| shared hosting clusters | barryobrien | Hosting & Domains | 1 | Nov 27th, 2006 13:25 |