50Webs Forum
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 21, 2018, 10:44:59 AM

Login with username, password and session length
Search:     Advanced search
66152 Posts in 10276 Topics by 6498 Members
Latest Member: ferada
* Home Help Search Login Register
+  50Webs Forum
|-+  General Forum
| |-+  Web Design and Multimedia
| | |-+  Prevent server puttin / in url
« previous next »
Pages: [1] Go Down Print
Author Topic: Prevent server puttin / in url  (Read 3669 times)
antimatter
Experienced Member
****
Posts: 2845



View Profile WWW
« on: January 14, 2008, 02:05:00 AM »

How do you prevent the server from addin a / at the end of a directory?

Eg example.com/hello/
I just want example.com/hello

.htaccess /= php?
Logged

Organisation européenne pour la recherche nucléaire

freshwire
Global Moderators
Experienced Member
*****
Posts: 6072



View Profile WWW
« Reply #1 on: January 14, 2008, 11:22:54 AM »

I dont know i think its the browser that actually puts it there. But whether you can tell it not to im not sure...
Logged

Jonathan | 50Webs Support Volunteer
XYLEM
Administrator
Experienced Member
*****
Posts: 7440


View Profile
« Reply #2 on: January 14, 2008, 01:19:38 PM »

The slash "/" is appended when the server realize that this is not a file but a directory.
Logged

freshwire
Global Moderators
Experienced Member
*****
Posts: 6072



View Profile WWW
« Reply #3 on: January 14, 2008, 01:39:53 PM »

If you were to manually define a rule in htaccess using mod_rewrite ideas...

Then it may stay without adding the / because...it would add the slash server side but not by the client...unless you specify the client be told with [R=301] or sumthing ...
Logged

Jonathan | 50Webs Support Volunteer
Gideon
50Webs moderators
Experienced Member
*****
Posts: 6596



View Profile WWW
« Reply #4 on: January 14, 2008, 01:46:52 PM »

I see no reason why you would want this anyway... what is it preventing you doing?
Logged




Hellooooooooo
antimatter
Experienced Member
****
Posts: 2845



View Profile WWW
« Reply #5 on: January 14, 2008, 09:00:48 PM »

Well many sites incl Digg and Google seem to have directories without the /, surely Sawan would know how to do this?
Logged

Organisation européenne pour la recherche nucléaire

wide_load
Experienced Member
****
Posts: 3573


View Profile WWW
« Reply #6 on: January 14, 2008, 09:19:46 PM »

Quote from: "GBHall"
Well many sites incl Digg and Google seem to have directories without the /, surely Sawan would know how to do this?


you meen like www.google.com/images rite ?

i dont think that that is a actual directory :s...

even if you do manage it firefox will put the slash back in lol only IE people will benefit (not that it really would be a bennifit either hehe)
Logged

antimatter
Experienced Member
****
Posts: 2845



View Profile WWW
« Reply #7 on: January 14, 2008, 09:21:37 PM »

Quote from: "wide_load"
Quote from: "GBHall"
Well many sites incl Digg and Google seem to have directories without the /, surely Sawan would know how to do this?


you meen like www.google.com/images rite ?

i dont think that that is a actual directory :s...

even if you do manage it firefox will put the slash back in lol only IE people will benefit (not that it really would be a bennifit either hehe)


Yeah, but I don't think they are real directories either, but I'm sure you can do something like this with htaccess, like redirect something.php to /something
Logged

Organisation européenne pour la recherche nucléaire

wide_load
Experienced Member
****
Posts: 3573


View Profile WWW
« Reply #8 on: January 14, 2008, 09:24:58 PM »

maby you could do somethign like...

just have the files with no extensions...

like somthing instead of something.html

and then make some kinda script thingy to make the browser display it properly

but that seems kinda stupid hehe !
Logged

antimatter
Experienced Member
****
Posts: 2845



View Profile WWW
« Reply #9 on: January 14, 2008, 09:25:09 PM »

I'm sure 've come across a way of doing this with .htaccess b4..

Look it must be .htaccess that gets the url and passes is thru a php file:
http://www.google.com/gareth
Logged

Organisation européenne pour la recherche nucléaire

wide_load
Experienced Member
****
Posts: 3573


View Profile WWW
« Reply #10 on: January 14, 2008, 09:35:20 PM »

Quote from: "GBHall"
I'm sure 've come across a way of doing this with .htaccess b4..

Look it must be .htaccess that gets the url and passes is thru a php file:
http://www.google.com/gareth


i think google does it liek a weird way of displaying a subdomain  

images.google.com also works...


hum hum
Logged

kentran
Noobie
*
Posts: 9


View Profile WWW
« Reply #11 on: September 06, 2017, 08:36:49 AM »

This is really hard. I will try to seek information on this.
Logged

Pages: [1] Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!