|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I've just started working with Apache, and have had good luck getting up and running, but find that if the typed in URL does not have a "/" typed in the end, it can't find my page.
ie: http://www.landtrustgroup.com/intermoc/ will work, but http://www.landtrustgroup.com/intermoc gets an error There must be a simple solution to this, but I can't find it. Please...any help? |
|
#2
|
|||
|
|||
|
Start here -> http://www.apache.org/docs/misc/rewriteguide.html and look under "Trailing Slash Problem".
|
|
#3
|
|||
|
|||
|
I've been there and tried a bunch of code, but don't seem to have it right or have it in the right place. Can you tell me the specific script and exeactly where is goes in my .conf file? Many thanks.
|
|
#4
|
|||
|
|||
|
don't you just need to set your 'ServerName' to www.landtrustgroup.com in httpd.conf?
|
|
#5
|
|||
|
|||
|
#httpd.conf
<Directory "/home/httpd/webroot"> Options blah blah AllowOverride blah blah RewriteEngine on RewriteRule ^intermoc$ intermoc/ [R] </Directory> OR #http://www.landtrustgroup.com/.htaccess RewriteEngine on RewriteRule ^intermoc$ intermoc/ [R] The link I gave you mentions exactly: >>So, to do this trick we write: >>RewriteEngine on >>RewriteBase /~quux/ >>RewriteRule ^foo$ foo/ [R] The only difference is the RewriteBase which you don't need one in your case. If you choose to put that in httpd.conf, be sure to "apachectl graceful". If you see error about the "RewriteEngine on" line, then too bad, your Apache doesn't have mod_rewrite support and you need to recompile your Apache preferably enable mod_so so you can compile additional modules using DSO method. [This message has been edited by freebsd (edited October 17, 2000).] |
|
#6
|
|||
|
|||
|
I still don't have it?!?!?!?!
in my httpd.conf I have the following included: <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory "c:/apache server files/htdocs"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> #LMB allowed this module 10 17 00 LoadModule rewrite_module modules/ApacheModuleRewrite.dll ..and later I have: #LMB added 10 17 00 to try to solve "/" problem <Directory "c:/apache server files/htdocs"> RewriteEngine on RewriteRule ^intermoc$ intermoc/ [R] </Directory> I have tried various combinations of all the language suggested, but still cant' get where I want. I have the latests Apache for Win2k running which was just downloaded from the web. lair |
|
#7
|
|||
|
|||
|
What? Running win2k????? You should have mentioned about that in the first place. Or else, one would assume you are running some kind of UNIX or Linux.
BTW, I dunno anything about Apache running on win32, so I can only give you some ideas how it should work on UNIX, you are on your own to apply that to your win2k environment. Why you have the following? <Directory "c:/apache server files/htdocs"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> AND <Directory "c:/apache server files/htdocs"> RewriteEngine on RewriteRule ^intermoc$ intermoc/ [R] </Directory> Both of this are incorrect. You need to merge the two together as: <Directory "c:/apache server files/htdocs"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all RewriteEngine on RewriteRule ^intermoc$ intermoc/ [R] </Directory> |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Newbie...how to avoid needing "/" at end. HELP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|