LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-13-2006, 04:05 PM   #1
mikeindo
Member
 
Registered: May 2004
Posts: 43

Rep: Reputation: 15
htaccess not redirecting?


I have a site hosted on a Linux box, but I'm not the administrator. I do have access to my site's/directory's .htaccess file and have tried to no avail to do force filetypes. There are no subdirectories - everything is at the root of the site/directory. Here are several things I've tried in .htaccess:

Redirect permanent /blah /blah.pdf
Redirect /blah /blah.pdf
Redirect permanent /blah http://mysite.com/blah.pdf
Redirect /blah http://mysite.com/blah.pdf
RedirectPermanent /blah /blah.pdf
RedirectPermanent /blah http://mysite.com/blah.pdf

<Files blah>
ForceType application/x-pdf
</Files>

<FilesMatch "\.blah$">
ForceType application/x-pdf
</FilesMatch>

In case it makes a difference, the site is run by Wordpress, which has added its own stuff to the .htaccess file, but underneath all the stuff I described above. Each line starts with "Rewrite", but I'm told mod_rewrite isn't even installed.

p.s. secondary issue might be related: also can't get page redirection working - like simpler URL www.mysite.com/blah to pull up actual page at www.mysite.com/index.php/blah
 
Old 01-13-2006, 10:35 PM   #2
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
You need to install mod_rewrite (as you've discovered) and AllowOverride needs to be enabled. I'd tell you how to do it only:

1. It won't help you since it's a hosted solution
2. I don't know which distribution you're on
3. I don't know which version of apache you're on

We need more info, and you need to find out if your host is willing to cooperate. There is a reason cheap hosts are cheap.
 
Old 01-14-2006, 04:54 AM   #3
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
It could also be a permission problem on your .htaccess file, you should check the permissions of your .htaccess first.
 
Old 01-14-2006, 03:57 PM   #4
mikeindo
Member
 
Registered: May 2004
Posts: 43

Original Poster
Rep: Reputation: 15
well, heh-heh, it's actually not linux specifically. it's MacOSX. i've posted to the "Other 'NIX" section too (and got a finger-wag for doing that) but havent heard from there. it's apache 1.3.33, and my host is my brother-in-law, so we're cool there. thanks fo any help.
 
Old 01-14-2006, 04:00 PM   #5
mikeindo
Member
 
Registered: May 2004
Posts: 43

Original Poster
Rep: Reputation: 15
permissions for it are 777 (-rwxrwxrwx). probably isnt supposed to be that loose, huh?
 
Old 01-15-2006, 12:28 AM   #6
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
Uh, no. Try 766.
 
Old 01-15-2006, 09:42 AM   #7
mikeindo
Member
 
Registered: May 2004
Posts: 43

Original Poster
Rep: Reputation: 15
ok, kimvette, thanks. so now that you have that info you asked for, any more input/suggestions?
 
Old 01-15-2006, 09:55 AM   #8
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
Check your permissions, it should be 755 or else anyone can change your files. Did you check your apache error log? It probably complains about the permissions also.
 
Old 01-15-2006, 02:44 PM   #9
mikeindo
Member
 
Registered: May 2004
Posts: 43

Original Poster
Rep: Reputation: 15
ok, perms changed to 755. so, back to my original issue, am i left with only the mod_rewrite installation to get this to work?
 
Old 01-16-2006, 07:52 PM   #10
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
Did you check your apache error log?!
 
Old 01-18-2006, 10:00 AM   #11
mikeindo
Member
 
Registered: May 2004
Posts: 43

Original Poster
Rep: Reputation: 15
is that possible since i'm not the server admin?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
htaccess not redirecting? mikeindo Other *NIX 1 01-13-2006 04:15 PM
Redirecting Console MadnessASAP Linux - Software 3 10-19-2005 01:42 AM
Port redirecting English_Man Linux - Networking 3 03-09-2004 08:40 AM
Redirecting Half_Elf Linux - Networking 2 09-04-2002 11:51 PM
about port redirecting cmardhekar Linux - Newbie 1 09-13-2001 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration