Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Old 08-06-2008, 01:54 PM htaccess HELP!
Super Talker

Posts: 129
Trades: 1
Hi,

I have no knowledge of htaccess at all and need some help. I have asked a lot of people for the last couple of months but have had do clear answer.

I think it's something to do with mod rewrite, I'm after.

What I want is to make the URL appear in a certain way. Like, I want the directory to NOT have a backslash after it.

So http://www.site.com/folder/ is what normal. I want the URL like this...
http://www.site.com/folder

Notice NO backslash after the folder. I want this to be done. Many sites have used this on their site, including videojug and such BIG sites. So it is possible.

Thanks for your help. If you could help me do this, it would be a GREAT favour.
__________________

Please login or register to view this content. Registration is FREE
yourmediaking is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-06-2008, 05:27 PM Re: htaccess HELP!
highanddry's Avatar
Close Talker

Posts: 880
Name: Jacob
Trades: 0
Isn't it the case that if you name your file "index.html" or whatever your htaccess refers to , then the folder will find it and display without a backslash?


mine works with shtml in htaccess

Quote:
AddHandler application/x-httpd-php5 .php
DirectoryIndex index.htm index.shtml
highanddry is offline
Reply With Quote
View Public Profile
 
Old 08-06-2008, 05:31 PM Re: htaccess HELP!
andrei155's Avatar
CEO of BLD Hosting

Posts: 1,514
Name: Andrei
Location: Canada
Trades: 6
so
what if someone DOES enter the backslash into the browser?
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting -
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 08-06-2008, 06:33 PM Re: htaccess HELP!
Super Talker

Posts: 129
Trades: 1
Why? I think I can manage my content better and I just like the look of it.
__________________

Please login or register to view this content. Registration is FREE
yourmediaking is offline
Reply With Quote
View Public Profile
 
Old 08-06-2008, 08:37 PM Re: htaccess HELP!
andrei155's Avatar
CEO of BLD Hosting

Posts: 1,514
Name: Andrei
Location: Canada
Trades: 6
Open up your .htaccess file, if non-existent, create one. Next, enter the following:

Code:
#remove ending slash thingy
#don't know what to call it lol.
RewriteCond %{HTTP_HOST} !^\.yoursite\.com$ [NC]
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]
Edit: make sure to put
Code:
RewriteEngine on
at the beginning of the .htacessfile.
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting -
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Last edited by andrei155; 08-06-2008 at 08:39 PM..
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 08-07-2008, 07:07 AM Re: htaccess HELP!
andrei155's Avatar
CEO of BLD Hosting

Posts: 1,514
Name: Andrei
Location: Canada
Trades: 6
I've been talking to yourmediaking via the PM system, and it seems that the mod_rewrite directives are causing a loop with the mod_dir that is compiled with Apache. At least, that's the only thing that I've considered. Firefox does, however, respond back with "Loop Error" (Can't remmeber the exact error page).

Basically the mod_rewrite instructions strip out the trailing slash, but the mod_dir bit put's it back on, and so on...

I may be looking at this the wrong way ..

Any help is appreciated.
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting -
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 08-07-2008, 10:17 AM Re: htaccess HELP!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
The problem here is that HTTP servers will automatically add a trailing slash to URIs which may or may not be displayed.

You may need to use the "special" variables and rewrite THE_REQUEST to avoid any looping.

Have a look through -> http://www.highrankings.com/forum/in...showtopic=5644 see if one of the many variations meets what you need.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to htaccess HELP!
 

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.86198 seconds with 12 queries