Discussion in "E107 FURL Support" started by    arvin    Sep 3, 2007.
Mon Sep 03 2007, 12:17 pm
#1
First of all, thanks for that great plugin.
I have it working on several sites.
Now my question, and surley i have searched the forums before.
At one site of me i have 171 cpages.
like page2.html , page3.html....
is there a way to rewritte this urls to
page2.html -> myname.html?
page3.html -> myage.htm?

would be great

thx for your answer
arvin
 tienduhieu like this.
Mon Sep 03 2007, 01:59 pm
#2
yes... you can do.. you need to do is..
in the e_module.php and sitelinks.sc file..
give the pattern exactly the same as the link you want..
like..
pattern[x] = '/page\.php\?3';
replacement[x] = 'myname.html';

pattern[x+1] = '/page\.php\?2';
replacement[x+1] = 'myage.html';

#if you want to rename any other pages..
#put the statement here.. like above..
#but the last statement should be at last only..

pattern[x+2] = '/page\.php\?([0-9]+)/';
pattern[x+2] = 'page$1.html';


x is the number of array..
and.. make sure the above has to be in the order as shown..
i mean if x is 3 then. first statement comes like 3, then next is 5 and then 6... if you have more pages.. to rename.. and they should come before the last statement..

In .htaccess file..
put the rewriterule for absolute pages in front..
like...
RewriteRule ^myname\.html(.*)$ /page.php?2
RewriteRule ^myage\.html(.*)$ /page.php?3
#if you want some more custom pages.. they goes here..
RewriteRule ^page([0-9]*)\.html(.*)$ /page.php?$1

the above are going to be in the same order again...
 arvintienduhieu like this.
Mon Sep 03 2007, 02:25 pm
#3
ah ok--great--will test it on nonproduktiv page first.

can it be you have a missmatch in your description between e_module and htaccess code you given?
in e_module mynyme.html is page.php3 in htaccess ists page.php2 ?--ithink its only a typo? or?

and in listing page.php?1 must be the last? means then by 170 cpages:

pattern[x+169] = '/page\.php\?([0-9]+)/';
pattern[x+169] = 'page$1.html';

? --will test it.
 tienduhieu like this.
Mon Sep 03 2007, 03:58 pm
#4
oops.. thats a typing mistake.. sorry
i am not getting what you are trying to say...
but the pattern '/page\.php\?([0-9]+)/';
must come last.. after you have made all the required substitutions... for your pages.. test and tell me.. also provide the website link if you feel any problem
 tienduhieu like this.
Mon Sep 03 2007, 04:19 pm
#5
k i am clear--now- thx--with 2 pages it works-now--will try it with now with page--"doubled" for sure---will inform you

at present not sure--how pageload is involved by--have to check it---another way in the meanwhile could be to make standalone custompages---store theme in e107_plugins/custom---or directy in thwe root of e107---have to test----your opinion?

searching for the best seo url goggle---whatever best solution with cms e107 to offer google the data google needs.

and all by not changing any core files (e107) - i am sure it possible (not for non-core plugs)

Mon Sep 03 2007, 04:47 pm
#6
well.. you can have them anywhere..
you see my aboutme.html page..
i made it a standalone page..
also.. my lcdpinout first page.. that is also a stand alone page.. and i put rewrite for these two..

like
RewriteRule ^aboutme.html$ /custompages/about.php


the above is just an example of what i did..

In FURL there is no change in core E107 files.. so you can use it freely and can upgrade e107 without any tension
 tienduhieu like this.
Mon Sep 03 2007, 05:07 pm
#7
in standalone cpages--only the folder is ugly - is your aboutme saved in the root?

would be another way--thougt about last nigt---17o sites in root---performace---sorry have no clue about
you have---surely with "mysuckingsite.html"--sorry you helped me alot at present i am trying to fin the best way- cause there are at least two ways to offer cpages with special urls---have to figue it out---what way....

thank you very much
 tienduhieu like this.
Mon Sep 03 2007, 05:28 pm
#8
the aboutme is not in root but with rewrite it looks like as if in root. but actually its in folder custompages
so put the rewrite as i gave in above example... there will not be any problem. just put the rewrite and test it..
you can remove the ugly part in the URL.. and have whatever u want.
 tienduhieu like this.
Tue Sep 04 2007, 04:45 pm
#9
x is just a number in the array its not the same with the page number..
you will always get error.. that way..
what i ment was..
pattern[] = '/page\.php\?([0-9]+)/';
replacement[] = 'page$1.html';
should come in the last after all the replacement u have made..
tell me what u have done..
 tienduhieu like this.
Tue Sep 04 2007, 05:00 pm
#10
ok-
sorry for--but i have tried a lot.
i am really not sure where the htaccess file should be located in my case.
the folderstructure where my e107 is located is public_html/folder1/folder2/my_e107

so then tried alot that case, cause in readme is: htaccess should be in public_html folder.
tried both ways :

RewriteBase /folder1/folder2/ (htaccess located in root - means public_html folder
RewriteBase /folder2/ (httaccess located in /folder1/

first question--with my folder struktur--where should htaccess should be loacated?

e_module looks like:
$pattern[148] = '/page\.php\?148';
$replacement[148] = 'myname.html';
$patterns[19] = '/page\.php\?([0-9]+)/';
$replacements[19] = 'page$1.html';

anf htaccess looks like (depends--at present, after several tries):

# PAGE.PHP =====================================
RewriteRule ^myname\.html(.*)$ /page.php?148
RewriteRule ^myage\.html(.*)$ /page.php?3
RewriteRule ^page([0-9]*)\.html(.*)$ page.php?$1

really not sure

with this Version i get something--but only in one folder deeper--means in folder1 but all images arent there---sure--cuase they are in folder 2--therefore confused.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am
ktaletrryp
Fri Apr 26 2024, 10:55 pm
Robertrip
Fri Apr 26 2024, 11:20 am