You are not logged in.
Pages: 1
Hello.
I'm thinking about SFU...
I created .htaccess file in root dir with
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ ?file=$1.php [L]
OK. Now adress /?file=kop1.php and /kop1 show me the same page.
Now in index.php i have changed $homepage from '?file=kop1'; into 'kop1';
Ok. Now i have "www.mydomen.com/kop1" working... and nothing more.
How to hange links in menu from ?file=kopX.php into kopX ?
Is it posible?
Last edited by a_bach (22-12-2008 19:32:36)
Offline
Try replacing "?file=$file" by "$file" in the function theme_menu(). You can find this function in index.php in pluck 4.6.
Offline
Try replacing "?file=$file" by "$file" in the function theme_menu(). You can find this function in index.php in pluck 4.6.
Work witch pages and ofcourse not with blog and gallery ![]()
Instrucion. Copy and paste into root dir .htaccess file
Then in index.php file change lines into :
#18 $homepage = 'kop1.php';
#204 $html_new = str_replace("#file", "$file", $html_new);
#209 $html_new = str_replace("#file", "$file", $html_new);
And now we have simple seo urls in pluck ![]()
Offline
I am excited about using pluck and have great plans for it...
Hope to add my contirbution of themes as soon as possible ![]()
Sander wrote:Try replacing "?file=$file" by "$file" in the function theme_menu(). You can find this function in index.php in pluck 4.6.
Work witch pages and ofcourse not with blog and gallery
Instrucion. Copy and paste into root dir .htaccess file
Then in index.php file change lines into
#18 $homepage = 'kop1.php';
#204 $html_new = str_replace("#file", "$file", $html_new);
#209 $html_new = str_replace("#file", "$file", $html_new);And now we have simple seo urls in pluck
I can't get this to work.
I made the .htaccess as follows:
# BEGIN Pluck
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ ?file=$1.php [L]
# END PluckI changed the lines on index.php as indicated, and got the header + menu and footer part OK but the content gives a 404 error.
Then I noticed that the pages do in fact exist without the .php ending - the means that mywebsite.com/kop1 and mywebsite.com/kop2 do show (but the menu uses .php endind so you you get the 404).
Pluck version is 4.6.1
Could anyone help?
Offline
Change in .htaccess
RewriteRule ^(.+)$ ?file=$1.php [L]
into
RewriteRule ^(.+)$ ?file=$1 [L]
In index.php there should be two changes:
change line 18, $homepage = 'kop1.php';)
In lines 202 and 207 replace "?file=$file" by "$file".
This should be it.
Ps. It dosn't work if you put pluck in subdirectory f.e. domain.com/pluck
Last edited by a_bach (20-01-2009 01:43:08)
Offline
I made a modification to Pluck ver. 4.6.1. Tested on my serwer...
http://www.pluck.ekyo.pl/downloads/pluc … rls.tar.gz
It should be working, also with blog and albums links.
More info in readme.txt file
Offline
Very good, i've played around with this and it works perfectly/
is there anyway to use mod_rewrite to name the files from 'kop' to something else, like 'display'..
htaccess stuff is apache, something thats well over my head and dont really wanna confuse it so much as i'm really trying to get to grips with PHP.
Offline
Very good, i've played around with this and it works perfectly/
is there anyway to use mod_rewrite to name the files from 'kop' to something else, like 'display'..
htaccess stuff is apache, something thats well over my head and dont really wanna confuse it so much as i'm really trying to get to grips with PHP.
You can use static pages, but this is hard one...
If you use seo modification in index.php in line 18 you can find:
$homepage = 'kop1.php';
Now.....
1. Change this variable into anything you want, f.e. home.php
2. Go to data/settings/pages and change name of file kop1.php into home.php (if you choose this name in p. 1).
3. You can change others names of files kopX.php
Now you have full seo urls
But there is some problems. Now if you create new page - it will have name: kop1.php. Ordering position pages in menu will not work - it will be alfabetical...
Those problems will be sold in 4.7 version of Pluck ![]()
Take a look of site: http://www.pluck.ekyo.pl/
First page is 1,pluck.php. second 2,opis.php. With numbers i can order posiotion pages in menu ![]()
Last edited by a_bach (16-03-2009 08:33:02)
Offline
Thanks for the reply bach, jsut to let everyone know i found a slightly alternative way to make the urls safe without altering pluck in any way, only limitation is that you needd to modify the htaccess file anytime that you add or move a page, but, if you've got a static structure website and dont mind hand coding the menu, here you go -
Just add this to the htaccess -
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index.php$ kop1.php
</IfModule>Its stupidly simple really, but i've never had any expierce with apache, so it was news to me.
You need to repeat the RewriteRule for everypage, the first pagename "index.php" being the actual pagename you want displayed in the address bar.
You do need to hand code the menu to direct to your theme template rather than using the dynamic menu system , but it all depends on the type of site you're making - if you need dynamic menus and the ability to move pages about, then this isnt the best solution, but for a static structure site its actually a very clean and easy method as ity doesnt require editing of the pluck system files at all..
Just for people who want to add an active link to hand coded menu items -
<li <?php if($current_page_filename == "kop1.php") {echo "class=\"current\"";}?>><a href="index.php" target="_self">Home</a></li>The server will still recognise kop1.php as the page being displayed, so you can use the above method for adding active classes, but still need the link itself to refer to your htaccess replacement names. If you want the default page to be index.php isntead of kop1.php then make the changes in the index.php as stated in posts above.
I've also used bachs other htaccess changes which are labeled above, they work together so its all good.
Offline
is it possible to get an update or finish code for making this work? "name.com/kop1/"
Im not that good as coder..
Offline
is it possible to get an update or finish code for making this work? "name.com/kop1/"
Im not that good as coder..
Modifiation is avaliable on my pluck site. See below.
Offline
kidvision wrote:is it possible to get an update or finish code for making this work? "name.com/kop1/"
Im not that good as coder..Modifiation is avaliable on my pluck site. See below.
I get this mate:
A hacking attempt has been detected. For security reasons, we're blocking any code execution.
Offline
a_bach wrote:kidvision wrote:is it possible to get an update or finish code for making this work? "name.com/kop1/"
Im not that good as coder..Modifiation is avaliable on my pluck site. See below.
I get this mate:
A hacking attempt has been detected. For security reasons, we're blocking any code execution.
Could you explain what you have doing? When this info show, etc....
Offline
How did he get such message?I wonder if he has done some tweaking with the given modification.
My guess: The rewrite rules are writing "/?file=kop1/.php" for /kop1/.
Remove the trailing slash and check.
~ Shanawaz
Offline
Thanx for sharing....
-----------
seo India
Offline
A hacking attempt has been detected. For security reasons, we're blocking any code execution.
When I got this error I found that my .htaccess file was missing. Putting this file in my pluck root folder removed the error.
Offline
Good day everyone!
What sort of page value $num = ""; I do not want to use page kopX.php and want to use page titles for $title, I have all this happened but the sort (functions.admin.php) does not allow me to do it , Pages sorted by $files as I need for $num how?
$num = "X"; - that I put into every page, are automatically when you create a new or editing old.
Russian
Добрый день всем!
Как отсортировать в странице значение $num = "1"; Я не хочу использовать названия страниц kopX.php а хочу использовать названия страниц по $title, у меня все это получилось но функция сортировки (functions.admin.php) мне не позволяет это сделать, страницы сортируются по $files а мне надо по $num как это сделать?
$num = "X"; - это я ввел в каждую страницу, автоматом делается при создании новой или при редактировании старой.
rao.php
$num = "1";
$title = "рао";
$content = "qwerty,qwerty";
$hidden = "yes";Last edited by srazil (19-02-2010 12:57:51)
Offline
a_bach
Alright I got it to kop1.PHP
This is much better SEO freindly but I wanna know how you got from here to the SEO freindly SEO on your pages.
http://www.pluck.ekyo.pl/en/3.Description.php
Bob
Offline
Bob, go to data/settings/pages
Change the names of your pages to what you want, make sure in the index.php you change the homepage location ![]()
I did this on my website and it is actually in the readme of a_bach's thing.
Offline
Pages: 1