Page 1 of 1

search engine friendly URLs problem..help

Posted: Sat May 03, 2008 9:43 pm
by definewebsites
Hi there,

I am trying to implement search engine friendly URLs on my website. I have a .htaccess file in the root of my server with the following rewrite rule,

Code: Select all

 
Options +FollowSymLinks
RewriteEngine on
RewriteRule portfolio/page/(.*)/ portfolio.php?page=$1
RewriteRule portfolio/page/(.*) portfolio.php?page=$1   
 
However, when I try to call my dynamic pages like mydomain/portfolio.php/page/2 , I get an error saying "No input file specified."

Am I missing something?

On my portfolio.php page, I have an if condition as below:

Code: Select all

 
if(isset($_GET['page']))
{
  $pageNum = $_GET['page'];
}
 
I would appreciate some assistance, thanks...

Re: search engine friendly URLs problem..help

Posted: Sun May 04, 2008 12:21 am
by Kastor
Try this :wink:

Code: Select all

<?php
$_QYERY1 = parse_url($_SERVER['REQUEST_URI']);
if (!empty($_QYERY1['query'])){
    $_QYERY2 = array();
    parse_str($_QYERY1['query'], $_QYERY2);
    $_GET = array_merge($_GET, $_QYERY2);
}
?>

Re: search engine friendly URLs problem..help

Posted: Sun May 04, 2008 5:19 am
by definewebsites
Hi, Thanks for the response.

I tried that but I still got the error "no input file specified"..

:(

Re: search engine friendly URLs problem..help

Posted: Sun May 04, 2008 9:11 am
by Kastor
However, when I try to call my dynamic pages like mydomain/portfolio.php/page/2 , I get an error saying "No input file specified."
Why portfolio.php? Try mydomain/portfolio/page/2/

Please write full error text

Re: search engine friendly URLs problem..help

Posted: Sun May 04, 2008 9:52 am
by definewebsites
Hi,

I did attempt calling my page like http://mydomain.com/portfolio/page/2 but I still received the error message which simply said "no input file specified".

Thanks