Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-28-2007, 10:03 PM
jap jap is offline
Junior Member
 
Join Date: Apr 2007
Posts: 23
Default Overriding the modrewrite structure

Hi,

I'll get straight to the point.
When you have 4 small pages like 'disclaimer, contact info, sitemap, about us,...'
And you wanna make an url like http://localhost/sitemap/ or /disclaimer/
You are forced to create a controller for each stupid small page you want to make... which I think is just not necessary.

Now I've made a controller called StaticpageController.php but now I have to do
http://localhost/staticpage/disclaimer

How do I make the rewrite engine just use /disclaimer ?

Thanks,
Jasper
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-29-2007, 05:48 AM
Cristian's Avatar
Administrator
 
Join Date: Feb 2007
Location: Sibiu, Romania
Posts: 99
Default

Actually i am totally rewriting the controller/action model...

I am personally using a database with pages (where each page has an action, a controller, a page ID and other elements), and in URL i am using just page ID along with some SEO things and URL will be like this:

/page-title-optimized-for-search-engines_pageid_language_optionalparam1_optionalpar am2_....

now, for you would be something like this, on index.php:

Code:
$request = new Zend_Controller_Request_Http();
$request->setControllerName("static");
$frontController->setRequest($request);

.......

$frontController->dispatch();
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:21 AM.