[SOLVED] main.php -> index.php
|
lucasnet
Joined: 2005-06-04
Posts: 72 |
Posted: Thu, 2005-06-30 19:14
|
|
I have another problem. My page have Google Pagerank 4. But when i enter to http://tuning4u.info script redirect me to http://tuning4u.info/main.php and my page rank is 0. But when i change main.php to index.php i cant use a gallery. Is there any option to solve that ? |
|
| Login or register to post comments |

Posts: 32506
give google some time. or ask a SEO, i guess it doesn't matter that much.
G2's ndex.php redirects to main.php, so it doesn't make any difference, actually.
Posts: 72
I know. But i know that i can do this
Why u use redirection? Why everything from main cant be in index ?
When i change in every file ("replace in files") main.php to index.php, do you think it will be working ?
Posts: 32506
no, the change from main.php to index.php is not that trivial. there are a couple of other places in G2 where you'd have to adjust it.
mindless and i discussed once to make it easier, e.g. by moving the name of the main.php file to config.php. but we haven't implemented this yet and it has a very low priority on our to do list...
Posts: 72
hmm. so maybe u just tell me in which file i must do changes? this is very importnat for me cause when visitor have google bar he see N/A page rank. So when i want exchange links with other site he tell me that i have no page rank.
Posts: 8601
we've slowly been converting main.php references to GALLERY_MAIN_PHP.. I went ahead and completed this. Get tomorrow's nightly snapshot and you can then put a line like this in your config.php:
define('GALLERY_MAIN_PHP', 'index.php');(or anything.php or main.php4 or whatever) Then copy or symlink main.php to the new filename.
Posts: 72
Great :D tnx.
Posts: 72
But it doesnt work.
I puted in config.php : define('GALLERY_MAIN_PHP', 'index.php');
page open but pictures dont show.
when i click in any album, error and he wants main.php
But in fresh install (new site) this is working.
I have problem at tuning4u.info where i updating gallery since 1 month.
Posts: 12544
It works fine for me. Did you copy the contents of main.php into index.php?
Posts: 32506
lucasnet, yup, you have to remove the old index.php file and rename the main.php file to index.php.
Posts: 72
solved 8) tnx
Posts: 28
lucasnet your site seems to be having problems, wasnt sure if you were aware of it or not.. like sql based...
Posts: 5
hello
has this "main.php -> index.php" issue been fixed for the latest version (gallery-2.1)?
i just tested it now and i get some silly results...
www.domain.com/gallery/index.php/winter/
i dont think this is intented?
is it posible to mask the index.php if a folder follows in the URL/URI?
thxs for any kind of informations
best regards
yago
Get system details;
Last Run Details:
Gallery version = 2.1 core 1.1.0
PHP version = 4.4.1 apache
Webserver = Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.1 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a
Database = mysql 4.0.25-standard, lock.system=flock
Toolkits = Exif, Getid3, ImageMagick, SquareThumb, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux server9.cyon.ch 2.6.9-22.ELsmp #1 SMP Sat Oct 8 19:11:43 CDT 2005 i686
Default theme = siriux
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Posts: 8601
don't know what issue you're talking about.. your sample url above looks like you're using URL rewrite module in "pathinfo" mode.
Posts: 5
hello
i was talking about this issue
http://codex.gallery2.org/index.php/Gallery2:FAQ#Can_I_rename_main.php.3F
to change the main.php to index.php
but now i have noticed that the index.php is always visible even if a folder follows
normaly this is the default (index.php is shown at the end of the URI)
www.domain.com/gallery/folderx/index.php
now with the latest gallery 2.1 and changed main.php i get this
www.domain.com/gallery/index.php/folderx/
ok here a real life example
http://www.fidelioproductions.ch/gallery/students_night_06/
there it worked! its also made with gallery but some version 2.01
is it posible to do the same with the latest version?
in other words to mask the "index.php" if folders follow in the URI ?
thankyou
best regards
yago
Posts: 8601
i still don't think your question has anything to do with renaming main.php to index.php
how the url is constructed depends on how you use the URL rewrite module. in pathinfo mode it will append to the base filename like that.. in mod_rewrite mode you can get URLs without it.
if you have more questions about URL rewrite then please start a new topic.
Posts: 66
I have just tried above solution to exchange index.php and main.php gut it turned into a failure
in the album main page the pictures were missing - also the random pics
however
the solution or cause of the problem is the originally created .htaccess where i find many rewrite rules like
RewriteCond %{REQUEST_FILENAME} !/photography/photo_gallery/main\.php$
or
RewriteRule . /photography/photo_gallery/main.php? [F,L]
or
/photography/photo_gallery/main.php?g2_view=rss.Render&g2_name=%1 [QSA,L]
and others
they all still have the main.php
how to renew existing auto-created rules for the mod_rewrite module ??
hans
Kriya Yoga - Teachings of Love |
Secrets of Love | Tropical wallpapers
Posts: 66
I gave it another try and have manually edited .htaccess by replacing all main by index - then added above changes ( config.php : define('GALLERY_MAIN_PHP', 'index.php'); ) and exchange main.pho with index.php
and now it seems to work - i tested mod_reqrite in test more and it showed for both mod_rewrite and .htaccess "success"
a dozen different pages test-view and so far all seems to be normal i.e. the new "main-page now is correctly
http://www.kriyayoga.com/photography/photo_gallery/index.php
and a call for
http://www.kriyayoga.com/photography/photo_gallery/main.php
now redirects correctly to
http://www.kriyayoga.com/photography/photo_gallery/index.php
may be we coiuld have such default pages in future releases ??
hans
Kriya Yoga - Teachings of Love | Secrets of Love | Tropical wallpapers
Posts: 277
This works fine...in a multisite install you simply have to rename main.php--->index.php in the gallery2 app folder and then go into the index.php file in your public html folder and edit it to point to index.php, not main. Has anyone figured out how to mask the index.php entirely though? I would prefer not to have it show at all. thanks
Posts: 6
I believe you need to choose mod_rewrite on this one instead of this one.
Uninstall the URL rewrite plugin first then reinstall choosing Apache Mod Rewrite option instead of Php Path Info. I hope I have made myself clear.
Just sharing my experience with the software.
Tyr it, it might work on you too.
http://www.josesantiagotan.com/
http://www.josesantiagotan.com/photos/
http://www.heddatan.com/