Rewrite Confusion
Posted: Fri 23. Apr 2004, 04:30
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.

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 :)