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 8509419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:25:46+00:00 2026-06-11T03:25:46+00:00

I have a website with a frontend and a backend that all run through

  • 0

I have a website with a frontend and a backend that all run through index.php. To access the back end you would go to http://www.mysite.com/Admin. This will still run through index.php but then connect to the database and go to the correct directory. The backend manages donation information that is collected on the site.

I want to change the front end to WordPress but still collect donation information in the original database and view it from the backend.

Rather than rewrite all the code, I was wondering if there was a way I could use mod-rewrite and place the WordPress files in a separate directory. This way any request that included /Admin as the start would go through the original index.php and any other request would redirect to directory with WordPress.

I originally tried:

RewriteCond %{REQUEST_URI} !^/Admin
RewriteRule ^(.*)$ gpf/$1 [L]

but a request for /Admin just gives me a 404 error.

Thanks in advance for any help.

This is the full .htaccess file

RewriteEngine On
Options -Indexes

# Serve 'gate' as php
<Files gate>
    SetHandler application/x-httpd-php
    AcceptPathInfo On
</Files>

FileETag MTime Size
AddCharset UTF-8 .xml

AddType video/mp4  mp4 m4v
AddType audio/mp4  m4a
AddType video/ogg  ogv
AddType audio/ogg  ogg oga
AddType video/webm webm

# redirect all domains (.net, .com, .biz, etc) to .org
RewriteCond %{HTTP_HOST} !^www\.mysite\.org$ [NC]
RewriteRule ^(.*)$ http://www.mysite.org/$1 [R=301,L]

# Route search
RewriteRule ^search$ /search/ [R,NC,L]

RewriteCond %{REQUEST_URI} !^/Admin
RewriteRule ^(.*)$ gpf/$1 [L]

# Route domain plus slash correctly
RewriteRule  ^$ /gate/ [L]

# All requests: serve _gate_ as php. 1st arg is requested URL qs preserved
RewriteRule ^([0-9A-Z].*) /gate/$1 [QSA,L]
RewriteRule ^rss\.xml /gate/rss.xml [QSA,L]

# PHP directives - should comment out on production server
php_value display_errors 1
php_value display_startup_errors 1

AddOutputFilterByType DEFLATE text/html application/x-javascript text/css text/javascript text/plain


<IfModule mod_expires.c>
ExpiresActive On

# Manually change filenames for static images. CMS changes names in dyn
ExpiresByType image/gif "access plus 9 months"
ExpiresByType image/jpg "access plus 9 months"
ExpiresByType image/jpeg "access plus 9 months"
ExpiresByType image/png "access plus 9 months"

# Rare changes. manually change filename

ExpiresByType image/x-icon "access plus 9 months"
ExpiresByType image/vnd.microsoft.icon "access plus 9 months"

# PDFs should never change. CMS renames in dyn
ExpiresByType application/pdf "access plus 6 months"
ExpiresByType application/x-pdf "access plus 6 months"

# Frequent changes. ASFU dynamic rename
ExpiresByType text/css "access plus 6 months"
ExpiresByType text/javascript "access plus 6 months"
ExpiresByType application/x-javascript "access plus 6 months"
</IfModule>
  • 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-06-11T03:25:48+00:00Added an answer on June 11, 2026 at 3:25 am

    Try adding an additional condition:

    RewriteCond %{REQUEST_URI} !^/Admin
    RewriteCond %{REQUEST_URI} !^/gate
    RewriteRule ^(.*)$ /gpf/$1 [L]
    

    And move the rules after all of the /gate/ rules.

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

Sidebar

Related Questions

Let's say that I have this website file root structure: frontend /home/username/public_html/ backend /home/username/public_html/admin/
I have a website that consists of 2 applications: Front end application Backend application
I am building a website in PHP & mySQL. It has frontend and backend
I have an existing EJB3/Hibernate (backend) and JSP (frontend) website. I want build an
On the front-end, I have a PHP webapp that allows users to create a
My project has a website (frontend) and an admin (backend). I would like to
I am new to .net and the back end of the website that i
I have a few ASP.Net database front-end websites where MS Access is the back-end.
I have website, usually all looks fine but sometimes one div is on the
I have website based on Umbraco 5. I have installed contact form plugin (http://cultivjupitercontact.codeplex.com/).

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.