The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

As an Amazon Associate I earn from qualifying purchases.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 mod_rewrite & apache 1.3 v apache 2
Author: David 
Date:   13-04-04 14:03

I am playing with a cms package called Sitellite, there is an included .htaccess file, to rewrite the URLs, but it seems to be written for Apache2.

My server is running 1.3.x and I have breen trying to get a version of their file to work, but to no avail. I've read quite a few articles and although learning, am worried about the order of events as well as the various options. Having real trouble NOT getting server error 500 most of the time.

Is it possible someone could show me (by way of example, the correct htaccess code for my apache v1 3.x


Here is what they've provided;

<IfDefine APACHE2>
AcceptPathInfo On
</IfDefine>

# Let Apache know that 'index' is really a PHP script in disguise.
<Files index>
ForceType application/x-httpd-php
</Files>

# Let Apache know that 'sitellite' is also a PHP script in disguise.
<Files sitellite>
ForceType application/x-httpd-php
</Files>

# Make SCS the directory index handler (instead of index.html or index.php).
DirectoryIndex index index.html index.php

# Instruct Apache to treat XT templates as HTML files upon direct access.
# Useful for previewing.
AddType text/html .tpl

Reply To This Message
 
 Re: mod_rewrite & apache 1.3 v apache 2
Author: el_kab0ng 
Date:   16-04-04 04:57

I use mod_rewrite within the httpd.conf file itself for my WAP pages.

First, I have this right above my virtual host containers...

RewriteEngine On
# Catch most WAP browsers
RewriteCond %{HTTP_ACCEPT} text/vnd\.wap\.wml [OR]
# WinWAP, WAPjag
RewriteCond %{HTTP_USER_AGENT} wap [OR]
#Nokia emulators (sdk)
RewriteCond %{HTTP_USER_AGENT} 7110
# Rewrite to where your wireless page is located
RewriteRule ^[\./](.*)$ /path/to/wap/page/index.wml [L]

Then within the Vhost container for the domain I wish to rewrite for i have this:

<VirtualHost www.domain.com>
ServerAdmin administrator@domain.com
DocumentRoot /usr/local/www/domain.com
ServerName www.domain.com
ServerAlias domain.com www.domain.com
ErrorLog /usr/local/www/logs/domain-error_log
CustomLog /usr/local/www/logs/domain-access_log combined
RewriteEngine On
# Catch most WAP browsers
RewriteCond %{HTTP_ACCEPT} text/vnd\.wap\.wml [OR]
# WinWAP, WAPjag
RewriteCond %{HTTP_USER_AGENT} wap [OR]
# Nokia emulators (sdk)
RewriteCond %{HTTP_USER_AGENT} 7110
# RewriteCond %{HTTP_REFERER} !^$
# RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com/.*$ [NC]
# Rewrite to where your wireless page is located
RewriteRule ^[\./](.*)$ /path/to/wap/page/index.wml [L]
# RewriteRule \.(js|gif|jpg)$ - [F]
</VirtualHost>

I don't know if this will help you or not, but at least it's an example..



Reply To This Message
 
 Re: mod_rewrite & apache 1.3 v apache 2
Author: Cornbread Eater 
Date:   18-11-04 15:19

I just got sitellite working. I was having the same issue with the .htaccess file and forcetype. Instead of displaying the page it would give me a dialog box asking me what I wanted to run the file with or to download it.

I replaced the
------------------------------
<Files index>
ForceType application/x-httpd-php
</Files>
------------------------------
with
------------------------------
RewriteEngine On
RewriteRule index index.php
------------------------------

seems to be working.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org