Web Server Configuration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Server Configuration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 3rd, 2004, 11:17 AM
phpPrgrmmr phpPrgrmmr is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 11 phpPrgrmmr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Only Displaying Directories while accessing pages

New Poster, long time browser here.

I am currently running Apache Server 2.0.52 with PHP 4.3.9.

What I was wondering was how would I go about making urls
such as http://www.some-site.com/dir1/somepg.html look like
http://www.some-site.com/dir1. (Minus the period obviously)

If anyone could help it would be very much appreciated, and
as always, thanks in advance for any help given.

Reply With Quote
  #2  
Old December 3rd, 2004, 01:33 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Canada
Posts: 331 Viper_SB User rank is Private First Class (20 - 50 Reputation Level)Viper_SB User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 4 h 53 m 7 sec
Reputation Power: 6
use rewrting, mod_rewrite I think.

Moved to Web Server Configuration

Reply With Quote
  #3  
Old December 3rd, 2004, 02:43 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Agreed, mod_rewrite
Check the documentation here: http://httpd.apache.org/docs/mod/mod_rewrite.html

You may need to enable it on your server in the conf file...
Here's a small guide, might be some help...

Reply With Quote
  #4  
Old December 3rd, 2004, 03:18 PM
phpPrgrmmr phpPrgrmmr is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 11 phpPrgrmmr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy

I have tried the mod_rewrite, and now have the following in
a .htaccess file in the commission directory.

Options +FollowSymLinks
RewriteEngine on
RewriteRule Commissions/$ /Bcklshv3/commission/Commissions.php

Now my problem is that each time I try to access the
Commissions.php file I get a HTTP 500 (Internal server error). Any help
on this?

Reply With Quote
  #5  
Old December 6th, 2004, 09:54 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Are you trying to access the file directly, or using http://yourdomain/Commissions/ ?

Reply With Quote
  #6  
Old December 6th, 2004, 04:56 PM
phpPrgrmmr phpPrgrmmr is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 11 phpPrgrmmr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry

What I am trying to do is access it through links from other webpages on my site. For example my server name is 3nimd.
So, when I try and access the file the address looks like http://3nimd/Bcklshv3/commission/Commissions.php. Whether
I type this location directly into my address bar, or whether the page is accessed via a hyperlink, as long as I have a
.htaccess file in the directory I receive an HTTP 500 (internal server error) message instead of the page. The very wierd
part of the whole scenario happens when i remove the .htaccess file form the directory. Everything works fine, but then I am faced with the problem that the .htaccess file was trying to fix. Does it make a difference that I am running a Windows 2000 machine, and not a Linux/Unix OS which readily recognizes files that start with the .(dot) prefix like .htaccess. If this is the whole problem then I guess I will have to live with it since the workstation that I am on belongs to the company that I work for. Otherwise, I am completely stumped.


Quote:
Originally Posted by MadCowDzz
Are you trying to access the file directly, or using http://yourdomain/Commissions/ ?

Reply With Quote
  #7  
Old December 7th, 2004, 09:08 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Apache on Windows recognizes .htaccess files, don't worry...

So you get a 500 error when you access thefile using the proper path?
What happens if you try accessing the file to your new mod_rewrite path?

It may help to change all links to the page to link to the mod_rewrite path...

[if using your mod_rewrite path gives a 500 error, your .htaccess may be incorrect]

Reply With Quote
  #8  
Old December 8th, 2004, 06:13 PM
oyejorge oyejorge is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 25 oyejorge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 13 sec
Reputation Power: 0
All signs point to a problem with the .htaccess file, and most likely it's because of the rewrite rule.
Mod_rewrite is powerful, but it's also a little finicky... I would try finding a different pattern to use with RewriteRule.

Also, for clarification, you're sending requests that end in "Commissions/" to "/Bcklshv3/commission/Commissions.php"

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Server Configuration > Only Displaying Directories while accessing pages


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT