Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Friendly Url Strange Behavior ??
Amit
Posted on 23 Feb 2011, 14:08:18

Access: Member
Total Posts: 3
Joined: 2011-02-23

First of all my site config
http://domain.com [for example] i installed the news-13 into the http://domain.com/article/ folder
then i enabled the Friendly url with the following settings

Enable Friendly Url : Yes
File Extension :.html
Prefix: /article/
Directory Filename :index.html

then i created two ".htaccess" files one in http://domain.com/article/.htaccess with following content
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /article/index.php [L]
and second .htaccess file in the root directory http://domain.com/ with the following content

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /index.php [L]
ok now i created a file in root directory at same level of http://domain.com/index.php of for example http://domain.com/AllHotels.php [which make the listing of all hotels for a particular category ] this file is template for listing and then i
created a file at same level http://domain.com/hotels.php with following content
<?php
$cat[]='Hotels';
include 'article/index.php';
?>

and now when friendly url work perfectly except one thing which is for example i CLICKED on "First hotel" in the listing of Allhotels.php so it will open all the details in simple page no site structure is followed but when i turn off friendly urls all work fine and all hotel detail is included into the same Allhotels.php file with "?id=hotelid" or i say no page template is followed when i click back button
it will come back to Allhotels.php page which follow the template page style
i think i cleared my question properly and completely thanks

Thanks thanks and again thanks for not only making this project but also making it free without any hard restriction
#3229
Chris
Posted on 23 Feb 2011, 15:37:17

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Try simply removing the .htaccess file in your /articles directory and leave only the root directory file to see if that solves the problem.
#3234
Amit
Posted on 23 Feb 2011, 15:53:51

Access: Member
Total Posts: 3
Joined: 2011-02-23

Thanks for Answering me i have tried and i figured out that i have done lots of misake
leave that matter and what i figure out my problem is that i have so many different categories like
hotels1.php
hotels2.php
hotels3.php and .....
so i made parallel files like
hotel1.php
hotel2.php
hotel3.php
and included the
<?php
$cat[]="hotel1";
include "article/index.php";
?>
into the above hotel1.php hotel2.php and hotel3.php files
all of the files are in root directory as hotels1.php files contain design and hotel1.php contain the real code to make story so in short i have

different file for .htaccess rule "RewriteRule .* /hotel1.php [L]" which is in root directory so i think you understand what i have done wrong i am not calling everying from index.php instead i am calling code form hotel1.php hotel2.php and so on AND then insert those stories into hotels1.php files

so in short i understand the problem partially that i have to write each separate rule RewriteRule .* /hotel.php [L] for each file which is not possible i think and due to this friendly url not working
so can you suggest me a simple solution for my site please
other wise i have to make my site from scratch
if you want more info or real conditions tell me i will make my site in that condition
#3235
Last edited by Amit at 2011-02-23 15:55:57 Reason:
Chris
Posted on 23 Feb 2011, 16:24:23

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Whilst this won't completely solve your problem with the friendly URLs, this method would allow you to combine all the hotel.php files into a single file

Code:
<?php
$cat 
= array();
$cat[] = $_GET['cat'];
include 
'news/index.php';
?>


Then to view a category add ?cat=hotel1 to the URL of the page, example

http://example.com/index.php?cat=hotel1

http://example.com/index.php?cat=hotel2
#3236
Network-13.com © 2013