Webmastersite.net
Register Log In

odd .htaccess problem

Comments on odd .htaccess problem

Jez
Forum Regular

Usergroup: Customer
Joined: Jan 19, 2007

Total Topics: 32
Total Comments: 130
Jez
Posted Nov 19, 2007 - 1:56 PM:

I have a strange problem with my .htaccess. I, for some reason cannot access my blog! It was OK last week or so (It's a new blog and I haven't written any posts yet). I added a line to the .htaccess that the WSN script produces to redirect all the old html pages but removing it does not help. I wonder if you can shed some light?

I paste the code:



Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R]
RewriteEngine On

rewriteRule ^([^/]*)\.html$ http://www.accommodation-uk.net/ [R,L]
RewriteRule ^admin/?$ admin/index.php

RewriteRule ^members/([0-9]+)\.html?$ memberlist.php?rewritten=1&page=$1
RewriteRule ^members/([-_/\+A-Za-z0-9]+)-([0-9]+)-trader\.html?$ trader.php?rewritten=1&id=$2
RewriteRule ^members/([-_/\+A-Za-z0-9]+)-([0-9]+)\.html?$ memberlist.php?rewritten=1&action=profile&id=$2
RewriteRule ^members/?$ memberlist.php?rewritten=1
RewriteRule ^help/?$ help.php?rewritten=1
RewriteRule ^help/([-_/\+A-Za-z0-9]+)/?$ help.php?rewritten=1&action=showcat&name=$1
RewriteRule ^help/([-_/\+A-Za-z0-9]+)/([-_/\+A-Za-z0-9]+)-([0-9]+)\.html?$ help.php?rewritten=1&action=showitem&id=$3


RewriteRule ^tags/([a-zA-Z0-9]+)/?$ search.php?rewritten=1&filled=1&action=filter&whichtype=links&tagscondition=like&tagssearch=|$1|

RewriteRule ^thread/([0-9]+)/([0-9]+)/$ comments.php?rewritten=1&id=$1&page=$2
RewriteRule ^thread/([0-9]+)/$ comments.php?rewritten=1&id=$1
RewriteRule ^links/[-_/\+A-Za-z0-9]+-([0-9]+)\.html$ link.php?rewritten=1&action=detail&id=$1
RewriteRule ^([0-9]+)/?$ index.php?rewritten=1&action=displaycat&catid=$1
RewriteRule ^([0-9]+)/([0-9]+)/?$ index.php?rewritten=1&action=displaycat&catid=$1&page=$2
RewriteRule ^([0-9]+)/sp([0-9]+).htm$ index.php?rewritten=1&action=displaycat&catname=$1&subpage=$2
RewriteRule ^([-_/\+A-Za-z0-9]+)/?$ index.php?rewritten=1&action=displaycat&catname=$1
RewriteRule ^([-_/\+A-Za-z0-9]+)/([0-9]+)/?$ index.php?rewritten=1&action=displaycat&catname=$1&page=$2


if it matters the blog should be at www.accommodation-uk.net/blog
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Nov 19, 2007 - 2:52 PM:

I don't know if this will help your case as I am no good with htaccess or php, but Paul guided me when I was having a problem getting access to my forum by adding RewriteRule ^forum/?$ forum/index.php at the top of .htaccess.

In this thinking you could perhaps try adding
 RewriteRule ^blog/?$ blog/index.php
at the top of .htaccess, next to the ^admin/ rule. ??
Jez
Forum Regular

Usergroup: Customer
Joined: Jan 19, 2007

Total Topics: 32
Total Comments: 130
Jez
Posted Nov 19, 2007 - 3:18 PM:

Hey Jill, I am going to just address my posts to you! Thanks. You just made my Christmas card list smiling face
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Nov 19, 2007 - 10:52 PM:

Jez wrote:
Hey Jill, I am going to just address my posts to you! Thanks. You just made my Christmas card list smiling face


LOL! Glad it worked! I have been a pain in the butt to Paul asking so many questions and how to do things, so glad it's now starting to pay off by helping others grin


Jez
Forum Regular

Usergroup: Customer
Joined: Jan 19, 2007

Total Topics: 32
Total Comments: 130
Jez
Posted Nov 20, 2007 - 4:01 AM:

Jill,

How do I change that code to include the folder blog/wp-admin/ ? Or do I add another rule?

Thanks,

Jez.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Nov 20, 2007 - 4:04 AM:

hmm, ok - that one I don't know <G> but would guess, yes you just make a new rule


Jez
Forum Regular

Usergroup: Customer
Joined: Jan 19, 2007

Total Topics: 32
Total Comments: 130
Jez
Posted Nov 20, 2007 - 11:49 AM:

No, I can't make that work. shaking head

I tried a few variations with and without the blog/ folder present. Any ideas? Paul?

Thanks,

Jez.


babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Nov 20, 2007 - 11:57 AM:

hmm, sorry, don't know/understand enough about .htaccess to be able to help here. Will have to be a question for the Maestro
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 20, 2007 - 1:51 PM:

The rule
RewriteRule ^blog/wp-admin/?$ blog/wp-admin/index.php

should do it. This all gets rather messy though... if possible, changing the blog to a subdomain blog.accommodation-uk.net so that it's no longer a subdirectory of WSN (in apache's view) would eliminate all the issues.
Jez
Forum Regular

Usergroup: Customer
Joined: Jan 19, 2007

Total Topics: 32
Total Comments: 130
Jez
#10 - Quote - Permalink
Posted Nov 20, 2007 - 2:02 PM:

Paul,

Is your rule in addition to Jill's rule or instead of?

I will see if it's still an option to move the blog to a sub directory- I wish I had thought of that first sad The .htaccess, with the redirect for all the old pages, plus the rest of the code that wsn links needs, is starting to look a real mess.


Jez
Forum Regular

Usergroup: Customer
Joined: Jan 19, 2007

Total Topics: 32
Total Comments: 130
Jez
#11 - Quote - Permalink
Posted Nov 20, 2007 - 4:22 PM:

Don't worry, I got it. Thanks
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.