Rewrite is driving me nuts
-
- Posts: 69
- Joined: Fri 2. Jul 2004, 01:46
- Contact:
Rewrite is driving me nuts
I have read all the posts on this and still can't get it to work.
Can somebody please explain, one step at a time, everything that needs to be done to activate the URL rewrite function. Please?
Thanks.
Can somebody please explain, one step at a time, everything that needs to be done to activate the URL rewrite function. Please?
Thanks.
hello
it's quite simple
rename the _.htaccess to .htaccess
and goto the conf.inc.php and change line 63
from
to
it's quite simple
rename the _.htaccess to .htaccess
and goto the conf.inc.php and change line 63
from
Code: Select all
$phpwcms["rewrite_url"] = 0; //whether URL should be rewritable
Code: Select all
$phpwcms["rewrite_url"] = 1; //whether URL should be rewritable
-
- Posts: 69
- Joined: Fri 2. Jul 2004, 01:46
- Contact:
BACKUP YOUR .HTACCESS fiel first then try this...
(The following code should be the ONLY code in your .htaccess)
if this doesn't work then post back for another way.
(The following code should be the ONLY code in your .htaccess)
Code: Select all
php_flag magic_quotes_gpc Off
php_flag register_globals Off
RewriteEngine On
^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.shtml$ index.php?id=$1.$2.$3.$4.$5.$6
RewriteRule ^(.+)\.shtml$ index.php?$1
~THAT~ .htaccess file is the one your system is using and NOT the one that comes with phpWCMS. You will need to ADD the contents of "_.htaccess" to your provider's file and read the part about "if phpWCMS is in a subdirectory"stevenlyons wrote:Thanks for the quick reply!
My htaccess file was already named .htaccess by the host and I have changed the conf.inc.php file as indicated. It does not work.
I have phpWCMS located in a directory called /cms...will this affect things?
# If phpwcms is installed in a subdirectory,
# sample: "mysubdir" then use this (remove #)
# if above lines doesn't work for you
# ===============================================
#RewriteBase /mysubdir
#RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.shtml$ /mysubdir/index.php?id=$1.$2.$3.$4.$5.$6
#RewriteRule ^(.+)\.shtml$ /mysubdir/index.php?$1
-
- Posts: 69
- Joined: Fri 2. Jul 2004, 01:46
- Contact:
lost with the rewrite stuff... (1&1 root server)
Hi folks,
I have the same trouble with the rewrite issue, and I think (as everyone I guess) I tried everything for the last two days, but I can’t get the bloody thing working.
When I use the (unchanged ! & renamed) _.htaccess as recommended, I get a server script error (guess #500), so I used CONFIXX and the “httpd special” feature and put this code there for my account:
Just stripped comments out to save space
With these settings without rewrite_url ON, I do not get any errors. Btw. I used any combination possible step by step, while switching “$phpwcms["rewrite_url"]” ON and OFF, but in ON mode I get this message
(ehem… me too
)
as soon as I try to switch to any of the pages of my test app.
This is the part of my conf.inc.php concerned:
I am at a loss as to what to do next…
I killed the .htaccess now, but someday, this century, I’d like to run search engine friendly URL’s….
Anyone got a clue about this issue?
Help desperately needed and appreciated!
(helpless) Ron
I have the same trouble with the rewrite issue, and I think (as everyone I guess) I tried everything for the last two days, but I can’t get the bloody thing working.
- OK, here are my tech data’s:
Code: Select all
1&1 root server
system: Linux pXXXXXXXX 2.6.7-040722 #1 SMP Thu Jul 22 21:41:08 CEST 2004 i686
server: Apache/2.0.49 (Linux/SuSE)
php: v4.3.4
path: /home/htdocs/web0/html
Code: Select all
DocumentRoot /home/htdocs/##user##/html
php_admin_flag safe_mode off
php_admin_value post_max_size 10M
php_admin_value memory_limit 32M
php_flag magic_quotes_gpc Off
php_flag register_globals Off
Options FollowSymLinks
RewriteEngine On
DirectoryIndex index.html index.php
RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.phtml$ index.php?id=$1.$2.$3.$4.$5.$6
RewriteRule ^(.+)\.phtml$ index.php?$1

With these settings without rewrite_url ON, I do not get any errors. Btw. I used any combination possible step by step, while switching “$phpwcms["rewrite_url"]” ON and OFF, but in ON mode I get this message
Code: Select all
Bad request!
Your browser (or proxy) sent a request that this server could not understand.

as soon as I try to switch to any of the pages of my test app.
This is the part of my conf.inc.php concerned:
Code: Select all
// site values
$phpwcms["site"] = "http://www.xxxxxxx.de/";
$phpwcms["admin_email"] = "xxxxxx@web.de";
// paths
$phpwcms["root"] = ""; //default: ""
$phpwcms["file_path"] = "phpwcms_filestorage"; //default: "phpwcms_filestorage"
$phpwcms["file_tmp"] = "phpwcms_tmp"; //default: "phpwcms_tmp"
$phpwcms["templates"] = "phpwcms_template"; //default: "phpwcms_template"
$phpwcms["dir_thlist"] = "thumb_list"; //default: "thumb_list"
$phpwcms["dir_preview"] = "thumb_preview"; //default: "thumb_preview"
$phpwcms["content_path"] = "content"; //default: "content"
$phpwcms["cimage_path"] = "images"; //default: "images"
$phpwcms["ftp_path"] = "phpwcms_ftp"; //default: "phpwcms_ftp"
.
.
.
// other stuff
$phpwcms["compress_page"] = 0; //0 = OFF, 1-9: page compression ON (1 = low level, 9 = highest level)
$phpwcms["imagick"] = 1; //0 = GD, 1 = ImageMagick, 2 = ImageMagick 4.2.9
$phpwcms["imagick_path"] = "/usr/bin"; //Path to ImageMagick (default="" - none)
$phpwcms["use_gd2"] = 1; //0 = GD1, 1 = GD2
$phpwcms["rewrite_url"] = 0; //whether URL should be rewritable
$phpwcms["wysiwyg_editor"] = 4; //0 = no wysiwyg editor, 1 = HTMLarea, 2 = FCKeditor, 3 = browser based
$phpwcms["phpmyadmin"] = 1; //enable/disable phpMyAdmin in Backend
$phpwcms["default_lang"] = "en"; //default language
$phpwcms["charset"] = "iso-8859-1"; //default charset 'iso-8859-1'
$phpwcms["allow_remote_URL"] = 0; //0 = no remote URL in {PHP:...} replacement tag allowed, 1 = allowed
$phpwcms["gt_mod"] = 0; //0 = Graphical Text MOD disabled, 1 = enabled
$phpwcms["jpg_quality"] = 75; //JPG Quality Range 25-100
$phpwcms["sharpen_level"] = 1; //Sharpen Level - only ImageMagick: 0, 1, 2, 3, 4, 5 -- 0 = no, 5 = extra sharp
$phpwcms["allow_ext_init"] = 1; //allow including of custom external scripts at frontend initialization
$phpwcms["allow_ext_render"] = 1; //allow including of custom external scripts at frontend rendering
I killed the .htaccess now, but someday, this century, I’d like to run search engine friendly URL’s….
Anyone got a clue about this issue?
Help desperately needed and appreciated!
(helpless) Ron
Ron
"Silence is foolish if we are wise, but wise if we are foolish."
"Silence is foolish if we are wise, but wise if we are foolish."
hello
you have a searchengine friendly cms! cos maybe google will scan the whole page! also as php pages.!*smile*
look at this!
http://www.google.de/search?hl=de&ie=UT ... tion&meta=
you have a searchengine friendly cms! cos maybe google will scan the whole page! also as php pages.!*smile*
look at this!
http://www.google.de/search?hl=de&ie=UT ... tion&meta=
nice try "paper nose"
but that does not solve the problem!
even if mr. google does his job...
it's like a book keeping problem. one cent difference may be the result of a huge mismatch in the whole account, and so I think about this subject too...
Ron

but that does not solve the problem!
even if mr. google does his job...
it's like a book keeping problem. one cent difference may be the result of a huge mismatch in the whole account, and so I think about this subject too...
Ron
Ron
"Silence is foolish if we are wise, but wise if we are foolish."
"Silence is foolish if we are wise, but wise if we are foolish."
I use one of their free three-year "promotional" accounts and the ".htaccess" cannot contain these types of commands in my particular setup:
You can comment them out -or- the way they are used on my account... is to create a "php.ini" file in each directory that you would like to waver from the master "php.ini" file. That is in a "hosted" situation though.
Code: Select all
php_admin_flag safe_mode off
php_admin_value post_max_size 10M
php_admin_value memory_limit 32M
php_flag magic_quotes_gpc Off
php_flag register_globals Off
well.
I could (btw. I already did it 2 days ago) change those parameters in the server core, because I have full access (lucky me), but WCMS was still arguing about this and pretended not to know anything about, even after a reboot of the server.
so I decided to put this lines into the .htaccess and (as far as I remember - after so much puzzling around) this lines alone have been accepted, but I try without those lines tomorrow... about noon today. it was another 20 hours workin day and I'm fed up for now...
C U & I let Ya know...
Ron
I could (btw. I already did it 2 days ago) change those parameters in the server core, because I have full access (lucky me), but WCMS was still arguing about this and pretended not to know anything about, even after a reboot of the server.
so I decided to put this lines into the .htaccess and (as far as I remember - after so much puzzling around) this lines alone have been accepted, but I try without those lines tomorrow... about noon today. it was another 20 hours workin day and I'm fed up for now...

C U & I let Ya know...
Ron
Ron
"Silence is foolish if we are wise, but wise if we are foolish."
"Silence is foolish if we are wise, but wise if we are foolish."
Re: Rewrite is driving me nuts
I strongly second this request. This is the only thing about PHPWCMS that I simply cannot figure. IMHO needs an official developer's tutorial covering the following:stevenlyons wrote:I have read all the posts on this and still can't get it to work.
Can somebody please explain, one step at a time, everything that needs to be done to activate the URL rewrite function. Please?
Thanks.
1) What the heck does URL-rewrite actually do?
2) As it is an option, do we even need to use it?
3) If everyone can utilise this feature, can we have a step by step guide to setting it up on a commercial webhost - which normally means safe-mode on, register_globals on and no direct access to the server configuration.
Plus any optional settings to help get it working for everbody.

I do everything above (rename _.htaccess, remove '#' for subderectory, ) but it just change the url, and I get 404 error?? I saw some post say about changing the httpd.conf of apache : AllowOverride All but I dont know where to change, I change something and get Internal Server Error?DeXXus wrote:~THAT~ .htaccess file is the one your system is using and NOT the one that comes with phpWCMS. You will need to ADD the contents of "_.htaccess" to your provider's file and read the part about "if phpWCMS is in a subdirectory"stevenlyons wrote:Thanks for the quick reply!
My htaccess file was already named .htaccess by the host and I have changed the conf.inc.php file as indicated. It does not work.
I have phpWCMS located in a directory called /cms...will this affect things?
# If phpwcms is installed in a subdirectory,
# sample: "mysubdir" then use this (remove #)
# if above lines doesn't work for you
# ===============================================
#RewriteBase /mysubdir
#RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.shtml$ /mysubdir/index.php?id=$1.$2.$3.$4.$5.$6
#RewriteRule ^(.+)\.shtml$ /mysubdir/index.php?$1
Any idea?
Last edited by ndtoan13 on Tue 10. May 2005, 04:13, edited 1 time in total.
Thank you for quick reply.Pappnase wrote:hello
test i first withou removeing of # for sub dirs!
cos sometime it works!
also refer you php.info to look if the mod_rewrite module is also loaded!
I have done both: if I leave .htaccess file as default (not subdir) It cause the same error :
Code: Select all
http://localhost/mydir/index.php?c15 => http://localhost/mydir/_c15.shtml
About php_info, I get
Code: Select all
url_rewriter.tags a=href,area=href,frame=src,input=src,form=,fieldset= a=href,area=href,frame=src,input=src,form=,fieldset=