roshanjonah Posted January 5, 2009 Share Posted January 5, 2009 Hi I am having problem with php files.... My .htaccess file looks like this: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html RewriteBase / RewriteRule ^website/([0-9]*)/(.*).html$ website.php?id=$1 RewriteRule ^viewall/([0-9]*).html$ index.php?page=$1 RewriteRule ^view/([0-9]*)/(.*)/([0-9]*).html$ cat.php?i=$1&page=$3 RewriteRule ^upcoming/([0-9]*)/(.*)/([0-9]*).html$ upcoming.php?i=$1&page=$3 RewriteRule ^users/([0-9]*)/(.*)/([0-9]*).html$ profile.php?id=$1&page=$3 My php file looks like this $page->SetParameter ('CAT_URL', $config['site_url'].'view/'.$story['story_cat'].'/'.modrewriteurl($cats[$story['story_cat']]['cat_title']).'/1.html'); $page->SetParameter ('PROFILE_LINK', $config['site_url'].'users/'.$story['user_id'].'/'.$story['user_name'].'/1.html'); $page->SetParameter ('EMAIL_URL', $config['site_url'].'website/'.$story['story_id'].'/'.modrewriteurl($story['story_title']).'.html'); I just want to make the url of these to be just like the site_url/view/category 1. site_url/view/category_title 2. site_url/users/username 3. site_url/website/website_title Can you please tell me how to edit these things to make it into the desired url mentioned above. Thank You - your help would be very much appreciated. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted January 8, 2009 Share Posted January 8, 2009 Read this: http://corz.org/serv/tricks/htaccess2.php Quote Link to comment Share on other sites More sharing options...
roshanjonah Posted January 9, 2009 Author Share Posted January 9, 2009 I am looking at it now and reading it through but have you got anything specific that i can read because neeed it sooon Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted January 9, 2009 Share Posted January 9, 2009 go to the "not-so-simple rewriting ... flat links and more" section, and look at the second example. Quote Link to comment Share on other sites More sharing options...
roshanjonah Posted January 10, 2009 Author Share Posted January 10, 2009 thank you for your interest....very much appreciated....but i am still trying to figure out....quite dumb in programming so will keep trying but if you know the solution then please post it in. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.