Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3636050
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:58:53+00:00 2026-05-19T00:58:53+00:00

I think I know how to hide the files but how do I use

  • 0

I think I know how to hide the files but how do I use mod_rewrite to allow only the web service to be called in the same directory?

Here is the directory/file structure

/var/www/html/xmlrpc/xmlrpc.server.php
/var/www/html/xmlrpc/xmlrpc.client.php
/var/www/html/xmlrpc/xmlrpc.class.php
/var/www/html/xmlrpc/xmlrpc.ini
/var/www/html/xmlrpc/logs

Important note: /var/www/html/xmlrpc/logs has 777 permission
before you start harping on me I plan to move this into a non public directory and give the correct permissions. But I was asked to see if I could hide it with the .htaccess file.

.htaccess

AuthType Basic
AuthName "My hidden files"
AuthBasicProvider file
AuthUserFile /var/www/html/xmlrpc/.pswds
Require valid-user

.pswds

user:5/abcde1abcdE

Also I’m a newbie with mod_rewite/mod_alias and need this URL:

http://127.0.0.1/xmlrpc/xmlrpc.server.php

to be this:

http://127.0.0.1/xmlrpc/v1/

How does one do this?

Also on know on the virtual host setup in Apache you can set the log file paths/names, can this be done from the .htaccess file as well?

Examples are welcome as this is a learning experience for me as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:58:53+00:00Added an answer on May 19, 2026 at 12:58 am

    Ah mod_rewrite. Try this in the xmlrpc directory:

    RewriteEngine On
    RewriteRule ^v1/$ xmlrpc.server.php [L]
    

    Some questions though – does xmlrpc.server.php take any get parameters? Can you guarantee that the url will always include a trailing slash?

    To enforce a trailing slash as well as some other stuff, try this:

    # Allows direct linking to files
    RewriteCond %{REQUEST_FILENAME} !-f
    
    #Checks if the url is missing a slash, if so, evaluate rule below
    RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule ^(.*)$ http://127.0.0.1/$1/ [L,R=301]
    

    The last rule will have to be adjusted depending on where you put the .htaccess file. If it’s at the root, then it will work for all lower directories. If it’s in the xmlrpc folder, then you can leave off the localhost.

    Also remember to restrict access to the .htaccess file:

    <Files .htaccess>
        order allow,deny
        deny from all
    </Files>
    

    Someone else will have to answer the other questions – not as familiar with that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.