Forum Moderators: coopster
from
[mysite.com...]
to
[mysite.com...]
is this possible
or like this
[mysite.com...]
and another htaccess question i want to chage
[mysite.com...]
to
[mysite.com...]
because if a visitor clicks the /directory they will see whats inside that directory so better change it to index.php
many thanks
fernan
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule .* /odp.php [L]
Basically, any non directory or non file gets diverted back to your php script (in your case odp.php). Once it's diverted use the variable $_SERVER['REQUEST_URI'] to access the URI string... then you can do pretty much anything with the navigation.
If you want to stop people from being able to view the apache directory listing, just add this to your .htaccess file:
IndexIgnore *
(You can, if you like, restrict it to certain file types.... e.g. IndexIgnore *.gif, *.jpg, *.png prevents image files from being listed).
happy htaccessing!
i added this to my htaccess but i got internal server error. :)
[qoute]Basically, any non directory or non file gets diverted back to your php script (in your case odp.php). Once it's diverted use the variable $_SERVER['REQUEST_URI'] to access the URI string... then you can do pretty much anything with the navigation. [/qoute]
i dont really understand your terms but is their any way i can make my urls work?
thanks
to this:
[excample.com...]
other words:
"?category=x," variable to, "directory-x.html"
Do this:
"RewriteRule ^directory-([0-9]*).* index.php?category=$1 [L,NC],".
thank you very much
dosdawgs
i pasted my .htaccess which turned out a little jumbled.
this has got to be one of the most annoying things i have ever attempted.
what am i missing here.
later,
dosdawgs
[edited by: coopster at 1:59 am (utc) on Mar. 12, 2005]
[edit reason] removed url per TOS [webmasterworld.com] [/edit]
i need to get the .php files to show as .html for spidering and thats really it.
As far as I know your .php pages will spider just like any .html no need to change them.
Thought you were going the other way .html to .php in order to run code on a html page. What are you expecting to happen at that url?
at any rate. thanks for your replies.
later,
dosdawgs
[edited by: coopster at 2:01 am (utc) on Mar. 12, 2005]
[edit reason] removed url per TOS [webmasterworld.com] [/edit]