Bad links after updating

Please post all install related problems here. Visit this forum first for troubleshooting.
Post Reply
Joe
Posts: 2
Joined: Fri 9. Apr 2004, 18:59
Contact:

Bad links after updating

Post by Joe »

My old version worked great! Just upgraded and now the links are missing the ...index.php?... in the URL so I get a PAGE NOT FOUND error. (http://127.0.0.1/phpwcms/_m1o.shtml) should be (http://127.0.0.1/phpwcms/index.php?_m1o.shtml)

I'm serving locally with OSX. Not sure that the _.htaccess is being recognized by OSX. Not sure why the old version still works but new version is broken. Followed upgrade instructions.

Help is a wonderful thing...
Thanks
Florian
Posts: 119
Joined: Wed 19. Nov 2003, 16:50
Location: Hamburg
Contact:

Post by Florian »

Hi Joe,

you've got to reneame the _.htaccess to .htaccess. Then it will *maybe* handled by OSX, but I'm not quite sure, because I've got no MAC here next to me, where I can try it. But I think it won't run caused by MAC OS "store the file ending in my metastore within the file" bug / feature wathever ;)

Good luck,
Florian
Joe
Posts: 2
Joined: Fri 9. Apr 2004, 18:59
Contact:

Post by Joe »

I could not get OSX to recognize a file starting with a "." so renamed the .htaccess file in the httpd.conf to _.htaccess and made sure to set AllowOverride All. Now it's working great.
eglwolf
Posts: 70
Joined: Mon 12. Apr 2004, 01:23

Post by eglwolf »

ok, thanks for this post it helped me figure our why my paths came out wrong.

Now, is it possible to change them extension from .shtml to .htm or .html?? If so how? I tried changing this in the htaccess file, but the script is still looking for shtml extension.
Pappnase

Post by Pappnase »

hello

i don't know why anymore but there was a reason that oliver made the riwrite to shtml. but if you look in the forum and search for rewrite you will find the older solution!
cutandpaste01
Posts: 3
Joined: Fri 30. Apr 2004, 19:28

and me too...

Post by cutandpaste01 »

Running phpwcms_1.1-RC3_2004-04-23

I'm having the same problem with bad links after upgrading to the latest version. Read a few posts on re-writes but am confused as to which of the hacks apply to which version (or even if they should be applied). I've posted my _.htaccess file below. The files are sitting in a sub-folder "phpcms" off my root folder.

When you hover over a menu item, some of the links in the menu system show as either:
filename.shtml, some as 10.0.0.1.0.0.shtml and some as _1Yz.shtml so it seems that the re-writing is not working properly or consistently.

Can anyone shed any light?

Thanks,

Simon

http://www.thamesdittonjuniorschool.co.uk

Code: Select all

php_flag magic_quotes_gpc Off
php_flag register_globals Off

# Rewrite functionality for phpwcms
# optimized by Jan212
# 18-04-2004

DirectoryIndex index.html index.php 
RewriteEngine On


# IF PHPWCMS IS INSTALLED IN YOUR WEB ROOT

# This will rewrite 0.0.0.0.0.0.shtml => index.php?id=0.0.0.0.0.0
# RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.shtml$ index.php?id=$1.$2.$3.$4.$5.$6

# This will rewrite mypage.shtml => index.php?mypage
# RewriteRule ^(.+)\.shtml$ index.php?$1


# If phpwcms is installed in a subdirectory,
# sample: "phpwcms" then use this (remove #)
# ===============================================
RewriteBase /phpcms

# This will rewrite 0.0.0.0.0.0.shtml => index.php?id=0.0.0.0.0.0
RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.shtml$ /phpwcms/index.php?id=$1.$2.$3.$4.$5.$6

# This will rewrite index-mypage.shtml => index.php?mypage 
RewriteRule ^(.+)\.shtml$ /phpwcms/index.php?$1 



#THIS IS FOR REWRITE LOGGING 
#RewriteLog "/absolute/path/to/the/rewrite.log" 
# 0 = Logging disabled, 9 = highest level of logging, only for debugging 
#RewriteLogLevel 3
Pappnase

Post by Pappnase »

hello!

yes the different filenames came if you give no alias. give every structure an alias and this should be work!
cutandpaste01
Posts: 3
Joined: Fri 30. Apr 2004, 19:28

Post by cutandpaste01 »

Pappnase,

Thanks, OK, I've aliased all of my site stucture menu items and the alias shows in the status bar as aliasname.shtml, but clicking on them from the menu still gets me a 404 error.

So, after the upgrade I'm left with a menuless site :-( :(

Do I need to make one of the rewrite hacks or not with my version of phpwcms (phpwcms_1.1-RC3_2004-04-23) ? and if so which one.

If it should work without the hack, then has anyone any ideas as to how to get the site working again?

Thanks,

Simon
Pappnase

Post by Pappnase »

hello

are you sure that you set the right path!?
cutandpaste01
Posts: 3
Joined: Fri 30. Apr 2004, 19:28

Post by cutandpaste01 »

Here's the config file:

Code: Select all

// site values
$phpwcms["site"]              = "http://www.thamesdittonjuniorschool.co.uk";
$phpwcms["admin_email"]       = "info@simon-finch.com";

// paths
$phpwcms["root"]              = "/phpcms";
$phpwcms["file_path"]         = "phpwcms_filestorage";
$phpwcms["file_tmp"]          = "phpwcms_tmp";
$phpwcms["templates"]         = "phpwcms_template";
$phpwcms["dir_thlist"]        = "thumb_list";
$phpwcms["dir_preview"]       = "thumb_preview";
$phpwcms["content_path"]      = "content";
$phpwcms["cimage_path"]       = "images";
$phpwcms["ftp_path"]          = "phpwcms_ftp";
Apart from the fact that the install directory is phpcms and not phpwcms the install is a default one.

Other Stuff:

Code: Select all

// other stuff
$phpwcms["compress_page"]     = 3;        //wenn 1 = Seite komprimieren, 0 = Kompresion aus
$phpwcms["imagick"]           = 0;        //if 0 = GD, 1 = ImageMagick convert
$phpwcms["imagick_path"]      = "";       //Path to ImageMagick
$phpwcms["use_gd2"]           = 1;        //if 0 = GD1, 1 = GD2
$phpwcms["rewrite_url"]       = 1;        //whether URL should be rewritable
$phpwcms["wysiwyg_editor"]    = 2;        //0 = no wysiwyg editor, 1 = HTMLarea, 2 = FCKeditor, 3 = browser based, 4 = spaw
$phpwcms["phpmyadmin"]        = 1;        //enable/disable phpmyadmin in Admin section
$phpwcms["default_lang"]      = "en";     //default language
$phpwcms["charset"]           = "iso-8859-1";       //default charset "iso-8859-1"
Thanks,
Simon
Pappnase

Post by Pappnase »

hello

try to change the installation path!

from

Code: Select all

// site values 
$phpwcms["site"]              = "http://www.thamesdittonjuniorschool.co.uk";
to

Code: Select all

// site values 
$phpwcms["site"]              = "http://www.thamesdittonjuniorschool.co.uk/";
and

Code: Select all

// paths 
$phpwcms["root"]              = "/phpcms";
to

Code: Select all

// paths 
$phpwcms["root"]              = "phpcms";
Post Reply