Hiding pages without extensions or filename

Hi,

I am using PHP 4.3.4, Apache 2.0.48 and Redhat 9.

There are many websites that does not seem to have a filename or extension such as .php, .jsp etc. Eg: http://www.domain.com/webpage?string=xx
or some sites even have the filename and extension missing!
Eg: http://www.domain.com/webpage/?string=xx

I would like to know how can i do this on apache and what are the changes i need to make on my scripts.

Thanks
pajiaoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yuzhCommented:
use Alias, see http:Q_20776384.html to learn more details
0
pajiaoAuthor Commented:
Thanks yuzh,

The solution will need to specify alias for every page involved and it will be a hassle for huge sites. How can i do it without specifying it manually and getting it to direct by itself?

thanks
0
pajiaoAuthor Commented:
I found a link which does similiar to what i want using mod_rewrite but i need to specify for every page that exists. Is there an dynamic method?

Here is the link:
http://www.phpfreaks.com/tutorials/23/0.php
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

mrielfCommented:
You can use RewriteCond to check that request with various extensions is real file or not.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pajiaoAuthor Commented:
Any examples mrielf?
0
TomDavidsonCommented:
ForceType is a way of forceing apache to treat certain files like other file types. In this example:
http://www.mywebpage.com/myfile would be treated as php

<Files myfile>
  ForceType application/x-httpd-php
</Files>

you can also use wildcards I believe so maybe something like:

<Files p*>
  ForceType application/x-httpd-php
</Files>

would work for you, it would evaluate all file starting with p as php scripts. If you want a more complicated naming convention for your scripts FilesMatch works much the same as files but allow a regular expression match instead.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.