Webmastersite.net
Register Log In

htaccess on subdomains
Rewritebase on subdomains

Comments on htaccess on subdomains

EU-Translations


Usergroup: Customer
Joined: Sep 08, 2005
Location: Germany

Total Topics: 2
Total Comments: 10
Posted Sep 11, 2005 - 5:29 PM:

Using the htaccess file for SE friendly urls gives me 500 erors. I figure this is because the rewritebase is not set correctly. I have the set up wsnlinks as a subdomain. I tried several settings for the RewriteBase, like / , but no luck yet.
Any ideas?
Thanks!
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 11, 2005 - 9:50 PM:

/ should work for a subdomain. For example, at http://links.philosophyforums.com/ I have this .htaccess:
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
EU-Translations


Usergroup: Customer
Joined: Sep 08, 2005
Location: Germany

Total Topics: 2
Total Comments: 10
Posted Sep 12, 2005 - 2:14 AM:

Thanks, Paul. I had tried to set the RewriteBase to / before, but I had the htaccess in the folder where the subdomain with wsnlinks lives in. I have now put it in the main folder - no more 500 errors!

But now I get these errors when browsing categories:
'No such content exists. The link you are following seems to have been incorrect.'
This happens wether I switch Use category names in URL to Yes or No.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 13, 2005 - 5:04 PM:

I had the htaccess in the folder where the subdomain with wsnlinks lives in.

But that's where I have mine... the .htaccess file is in the /public_html/links/ directory. Putting it in a higher level directory wouldn't work, it'd be looking for categories at all the wrong levels.

Might you have already had a higher level .htaccess that was setting some sort of rule interfering with the one in the links directory? Though the order or precidence should prevent that.

Maybe the last post of www.webmastersite.net/oldfo...s/index.php?showtopic=3293 is related to your issue.
EU-Translations


Usergroup: Customer
Joined: Sep 08, 2005
Location: Germany

Total Topics: 2
Total Comments: 10
Posted Sep 14, 2005 - 11:15 AM:

OK, forget it. Thanks for your help Paul.
The problem was in the end trivial - I had TextPad, my fav editor, told to save files per default with writing Unicode und UTF-BOM, and so that's how textpad saved the htaccess files. Doh!
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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