mod_rewrite

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
tobiTOBSEN
Posts: 16
Joined: Sun 23. Oct 2005, 19:47
Location: bayern ganz oben

mod_rewrite

Post by tobiTOBSEN »

is there any possibilty to rewrite the urls to domain.de/alias.phtml

my actual path looks like this: domain.de/v2/29.23.0.0.1.0.phtml

this is the used snippet of my .htaccess
mod_rewrite is enabled in conf

Code: Select all

# If phpwcms is installed in a subdirectory,
# sample: "mysubdir" then use this (remove #)
# if above lines doesn't work for you
# ===============================================
RewriteBase /v2
RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.phtml$ /v2/index.php?id=$1,$2,$3,$4,$5,$6
RewriteRule ^(.+)\.phtml$ /v2/index.php?$1 

thx in advance
wer anderen eine bratwurst brät, der hat ein bratwurstbratgerät
Ben
Posts: 558
Joined: Wed 14. Jan 2004, 08:05
Location: Atlanta
Contact:

Post by Ben »

Unless I misunderstand you, all you need to do is go to ADMIN > Site Strucuture and edit each structure level to have a word for the alias value.
tobiTOBSEN
Posts: 16
Joined: Sun 23. Oct 2005, 19:47
Location: bayern ganz oben

Post by tobiTOBSEN »

in the site struture aliases are already set, but it isn´t shown in the actual
url...


is there any ability to remove my subfolder in the url?

http://www.tobivandeisner.de/v2
wer anderen eine bratwurst brät, der hat ein bratwurstbratgerät
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi tobiTOBSEN,

there is no easy trick to masking your subfolder. It is very very special including side effects.

My recommendation:
1. Save all your static files.
2. Upload these files to your root folder.
3. Edit the config.inc.php and htaccess
4. Your installation is running well at your root level.


URL-Problem:

- rewrite_url in your config.inc.php = on
htaccess at your sublevel and/or root:

Code: Select all

RewriteEngine On
file php.ini at your sublevel:

Code: Select all

php_flag magic_quotes_gpc Off
php_flag register_globals Off
Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
tobiTOBSEN
Posts: 16
Joined: Sun 23. Oct 2005, 19:47
Location: bayern ganz oben

Post by tobiTOBSEN »

ok, subfolder masking won´t work... it doesn't greatly matter...

Code: Select all

# These settings are recommend
# Maybe you might have problems
# with other scripts that needs
# register_globals ON
php_flag magic_quotes_gpc Off
php_flag register_globals Off

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

# Check that you have set Options FollowSymLinks
# and right Allow
RewriteEngine On

# maybe you need this
#DirectoryIndex index.html index.php 


# Default ReWrite settings for phpwcms
# ===============================================
# This will rewrite 0.0.0.0.0.0.phtml => index.php?id=0.0.0.0.0.0
#RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.phtml$ index.php?id=$1,$2,$3,$4,$5,$6

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


# If phpwcms is installed in a subdirectory,
# sample: "mysubdir" then use this (remove #)
# if above lines doesn't work for you
# ===============================================
RewriteBase /v2
RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.phtml$ /v2/index.php?id=$1,$2,$3,$4,$5,$6
RewriteRule ^(.+)\.phtml$ /v2/index.php?$1 


# If you want to set rewrite logging
# ===============================================
#RewriteLog "/absolute/path/to/the/rewrite.log" 
# 0 = Logging disabled, 9 = highest level of logging, only for debugging 
#RewriteLogLevel 3
this is my hole .htaccess and in config.inc.php rewrite_url is set to 1

but the url is still looking like this:

http://www.tobivandeisner.de/v2/18.33.0.0.1.0.phtml

but it should like look this;

http://www.tobivandeisner.de/v2/ueber-das-projekt.phtml
wer anderen eine bratwurst brät, der hat ein bratwurstbratgerät
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Ok, mod_rewrite is working at your site very well.
Your problem are the alias. Ben has said:
Unless I misunderstand you, all you need to do is go to ADMIN > Site Strucuture and edit each structure level to have a word for the alias value.
no alias set:
mod_rewrite on: ....18.33.0.0.1.0.phtml
mod_rewrite off: ....index.php?18.33.0.0.1.0

alias set:
mod_rewrite on: ....ueber-das-projekt.phtml
mod_rewrite off: ....index.php?ueber-das-projekt

Killing your cms cache and doit once again please.
Have you patched your system?
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
tobiTOBSEN
Posts: 16
Joined: Sun 23. Oct 2005, 19:47
Location: bayern ganz oben

Post by tobiTOBSEN »

but i set alias in Seitenstruktur // Alias der Seitenebene for every level in my
sitestructure e.g. for "Über das Projekt" the alias is ueber_das_projekt...

killing the sitecache and deleting/overwriting the alias don´t solve the problem...

what do u mean by patching?
the version my phpwcms is 1.2.5 dev
wer anderen eine bratwurst brät, der hat ein bratwurstbratgerät
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

patching: changing the source or core. (Verändern des Quellcodes).
- reptags, modes?

If there is a second database avalable, I would install the 1.26DEV at root.
A clean and small installation without fck, spaw and any reptags ore modes.

Insert a basic tempelate and test it. This is made in an hour or two.
Without success I think apache V2 running on suse are the problem.

If you shout halleluja you have a basic and clean installation for your site at root.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Post Reply