Rewrite Confusion

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
kpimichael
Posts: 44
Joined: Mon 29. Dec 2003, 03:29

Rewrite Confusion

Post by kpimichael »

First let me say... I dont know a lot about htaccess. I have phpwcms in a folder called cms I dont want it to affect the editors. I have read the forums and put together what i think i need to have to get the rewrite to work. BUT... for some reason i keep getting 500 internal errors. I have rechecked and rechecked... and i dont see what it could be unless it has something to do with some of the stuff that was already in my .htaccess file. Hope someone will take the time to look at this...that has more of a brain than i. 8)

Code: Select all

php_flag magic_quotes_gpc Off
php_flag register_globals Off

# Start of Server code
# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.address.com
AuthUserFile /home/wheredot/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/wheredot/public_html/_vti_pvt/service.grp
# end of Server code

#enhancement if having 500 problem
AllowOverride All
Options +FollowSymLinks

DirectoryIndex index.php
RewriteEngine on

# if your in an subdirectory called "phpwcms" define the rewrite-base
 RewriteBase /cms
# Otherwise remove the /phpwcms/ from the rewrite rules (should be
# index.php?id=$1.$2.$3.$4.$5.$6, index.php?$1 then)

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

# This was changed because of this thread
# http://www.phpwcms.de/forum/viewtopic.php?t=1542&highlight=rewrite
RewriteCond %{REQUEST_URI} ^/(cms)/?.*$
RewriteRule ^([a-zA-Z0-9_]+)\.html$ /cms/index\.php?$1 [L]

# This will rewrite mypage.html => index.php?mypage
RewriteRule (.+)[.]html /cms/index.php?$1
#THIS FOR LOGGING
#RewriteLog "/absolute/path/to/the/rewrite.log"
# 0 = Logging disabled, 9 = highest level of logging, only for debugging
#RewriteLogLevel 3

# The bottom... Thanks for looking :)
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

you have to set up

Code: Select all

AllowOverride All 
Options +FollowSymLinks 
in httpd.conf, vhost.conf...
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
Post Reply