Jump to content

.htaccess help with php .modrewriterule


roshanjonah

Recommended Posts

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.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.