Webmastersite.net
Register Log In

Mod rewrite
cannot get it working

Comments on Mod rewrite

larryjam
Member

Usergroup: Customer
Joined: Sep 25, 2003
Location: Canada

Total Topics: 22
Total Comments: 48
Posted Dec 24, 2006 - 4:28 PM:

I am trying to enable mod rewrite, I have enabled it in the admin controll panel under Settings/Search and seo, I renamed the htaccess.txt file to .htaccess have edited the .htaccess, by uncommenting the RewriteBase / line

I receive an error 500 page, I don't know if I have to chmod the permissions on the .htaccess or if I have to instert anything into the line I uncomment. The instructions state: If not wrking, uncomment and correctly fill the line below: I uncommented by I don't have any idea what to put in there!

I have copied the file here.
Please help

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Options +FollowSymlinks
RewriteEngine on

# If not working, uncomment and correctly fill the line below:
RewriteBase /

RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R]

RewriteRule ^admin$ admin/index.php
RewriteRule ^admin/$ admin/index.php

RewriteRule ^links/([a-z]+)/([0-9]+)/?$ link.php?action=$1&id=$2
RewriteRule ^links/([0-9]+)/?$ link.php?id=$1

RewriteRule ^thread/([0-9]+)/?$ comments.php?id=$1
RewriteRule ^thread/([0-9]+)/([0-9]+)/?$ comments.php?id=$1&page=$2

RewriteRule ^([0-9]+)/?$ index.php?action=displaycat&catid=$1
RewriteRule ^([0-9]+)/([0-9]+)/?$ index.php?action=displaycat&catid=$1&page=$2

RewriteRule ^([-_/\+A-Za-z0-9]+)$ index.php?action=displaycat&catname=$1

RewriteRule ^links/([-_/\+A-Za-z0-9]+)-([0-9]+).html$ link.php?action=detail&id=$2
RewriteRule ^/([-_/\+A-Za-z0-9]+)-([0-9]+).html$ link.php?action=detail&id=$2
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 25, 2006 - 5:31 PM:

by uncommenting the RewriteBase / line

If you've installed at /directory/, you need a /directory/ RewriteBase line. That's probably not the issue here though -- your host may have disabled rewriting, ask them.
larryjam
Member

Usergroup: Customer
Joined: Sep 25, 2003
Location: Canada

Total Topics: 22
Total Comments: 48
Posted Dec 31, 2006 - 11:04 AM:

Thank you Paul, I have it set now as /directory, without the trailing slash and it is working fine.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.