943,822 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 7903
  • PHP RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Apr 17th, 2009
0

Re: create dynamic link without creating new php page??

Wait for my replay i am going through your code...
Reputation Points: 3
Solved Threads: 15
Posting Whiz
Aamit is offline Offline
341 posts
since Apr 2008
Apr 17th, 2009
0

Re: create dynamic link without creating new php page??

ok m here but hurry up...
Reputation Points: 16
Solved Threads: 48
Posting Whiz
BzzBee is offline Offline
327 posts
since Apr 2009
Apr 17th, 2009
0

Re: create dynamic link without creating new php page??

Thank You Thank You Thank You Thank You Thank You
Very Much...


You r rock star...

It perfectly work on localhost...

I integrating on live if i found any difficulty with htaccess i will tell you

Thanks for your help...god bless you
Reputation Points: 3
Solved Threads: 15
Posting Whiz
Aamit is offline Offline
341 posts
since Apr 2008
Apr 17th, 2009
0

Re: create dynamic link without creating new php page??

no no its really ok. I always feel so happy when i be able to help others. please feel free to ask any question.

i will be happy if you will write your kind remarks in my reputation

Add to BzzBee's Reputation about my posts
Last edited by BzzBee; Apr 17th, 2009 at 3:08 am.
Reputation Points: 16
Solved Threads: 48
Posting Whiz
BzzBee is offline Offline
327 posts
since Apr 2009
Apr 17th, 2009
0

Re: create dynamic link without creating new php page??

hi,
In htaccess
PHP Syntax (Toggle Plain Text)
  1. RewriteEngine on
  2. RewriteBase /project_test/
  3.  
  4. RewriteCond %{REQUEST_FILENAME} !-d
  5. RewriteCond %{REQUEST_FILENAME} !-f
  6. RewriteRule ^projects/(.*)/$ project_detail.php?pname=$1 [L]


and my project_detail.php file at
http://localhost/demo/abc/index.php
http://localhost/demo/abc/project_detail.php
when click on link
http://localhost/demo/abc/projects/school-project/
IT gives page not found

I think some modification needed at this line
PHP Syntax (Toggle Plain Text)
  1. RewriteRule ^projects/(.*)/$ project_detail.php?pname=$1 [L]

plz tell me what to do??
Last edited by Aamit; Apr 17th, 2009 at 3:11 am.
Reputation Points: 3
Solved Threads: 15
Posting Whiz
Aamit is offline Offline
341 posts
since Apr 2008
Apr 17th, 2009
0

Re: create dynamic link without creating new php page??

Click to Expand / Collapse  Quote originally posted by Aamit ...
hi,
In htaccess
PHP Syntax (Toggle Plain Text)
  1. RewriteEngine on
  2. RewriteBase /project_test/
  3.  
  4. RewriteCond %{REQUEST_FILENAME} !-d
  5. RewriteCond %{REQUEST_FILENAME} !-f
  6. RewriteRule ^projects/(.*)/$ project_detail.php?pname=$1 [L]


and my project_detail.php file at
http://localhost/demo/abc/index.php
http://localhost/demo/abc/project_detail.php
when click on link
http://localhost/demo/abc/projects/school-project/
IT gives page not found

I think some modification needed at this line
PHP Syntax (Toggle Plain Text)
  1. RewriteRule ^projects/(.*)/$ project_detail.php?pname=$1 [L]

plz tell me what to do??
Try making the following your .htaccess file:
PHP Syntax (Toggle Plain Text)
  1. RewriteEngine on
  2.  
  3. RewriteRule ^projects/(.*)/$ project_detail.php?pname=$1
Also make sure that mod_rewrite is enabled in the apachie configurations.
Sponsor
Featured Poster
Reputation Points: 410
Solved Threads: 258
Occupation: Genius
cwarn23 is offline Offline
3,004 posts
since Sep 2007
Apr 17th, 2009
0

Re: create dynamic link without creating new php page??

Click to Expand / Collapse  Quote originally posted by Aamit ...
hi,
In htaccess
PHP Syntax (Toggle Plain Text)
  1. RewriteEngine on
  2. RewriteBase /project_test/
  3.  
  4. RewriteCond %{REQUEST_FILENAME} !-d
  5. RewriteCond %{REQUEST_FILENAME} !-f
  6. RewriteRule ^projects/(.*)/$ project_detail.php?pname=$1 [L]


and my project_detail.php file at
http://localhost/demo/abc/index.php
http://localhost/demo/abc/project_detail.php
when click on link
http://localhost/demo/abc/projects/school-project/
IT gives page not found

I think some modification needed at this line
PHP Syntax (Toggle Plain Text)
  1. RewriteRule ^projects/(.*)/$ project_detail.php?pname=$1 [L]

plz tell me what to do??
hello amit

look, when we are in root directory means www the rewrite base will be as
PHP Syntax (Toggle Plain Text)
  1. RewriteBase /
when you are in demo folder with in the root directory so the rewite base will be as

PHP Syntax (Toggle Plain Text)
  1. RewriteBase /demo/
as same in your case it should be

PHP Syntax (Toggle Plain Text)
  1. RewriteBase /demo/abc/

now try it

PHP Syntax (Toggle Plain Text)
  1. RewriteEngine on
  2. RewriteBase /demo/abc/
  3.  
  4. RewriteCond %{REQUEST_FILENAME} !-d
  5. RewriteCond %{REQUEST_FILENAME} !-f
  6. RewriteRule ^projects/(.*)/$ project_detail.php?pname=$1 [L]
Last edited by BzzBee; Apr 17th, 2009 at 7:06 am.
Reputation Points: 16
Solved Threads: 48
Posting Whiz
BzzBee is offline Offline
327 posts
since Apr 2009
Apr 18th, 2009
0

Re: create dynamic link without creating new php page??

RewriteEngine on

RewriteRule ^projects/(.*)/$ project_detail.php?pname=$1
Reputation Points: 10
Solved Threads: 1
Newbie Poster
GameGape.com is offline Offline
3 posts
since Apr 2009
Apr 20th, 2009
1

Re: create dynamic link without creating new php page??

hello Amit,

Is you issue solved or not?
Reputation Points: 16
Solved Threads: 48
Posting Whiz
BzzBee is offline Offline
327 posts
since Apr 2009
Feb 18th, 2010
0
Re: create dynamic link without creating new php page??
BzzBee that script worked great !! I do have a question how can we add title and description to metag tags. for each page created example page:
mydomain.com/web-design-software/
I would want to have Title: Web Design Software
Description: All you need to know about Web Design

I tired echo
PHP Syntax (Toggle Plain Text)
  1. <title><?php echo $pname ?> </title>
  2. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  3. <meta name="description" content="<?php echo $project_other_info ?>" />
  4. <meta name="keywords" content="<?php echo $tagz=$rowp['tagz']; ?>" />

But that just brings the title as web-design-software
And the Description - Keywords just shows blank.

Any help would be appreciated .
Thanks
Reputation Points: 10
Solved Threads: 0
Newbie Poster
JEFEX13 is offline Offline
1 posts
since Feb 2010

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Pagination script not displaying records - why?
Next Thread in PHP Forum Timeline: php local time not working





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC