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

  • SEARCH
  • Home
  • 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 882219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:23:40+00:00 2026-05-15T12:23:40+00:00

hi guys I’ve build a website using the zend framework and using clean urls

  • 0

hi guys I’ve build a website using the zend framework and using clean urls – however I need to set up a subdomain such that it points to only one folder on my website i.e I want the subdomain admin.mysite.com to point to mysite.com/admin and I wanna do it using my htaccess file

EDIT ——-

This is my htaccess file:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule (.*) http://www.mysite.com/$1 [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php
RewriteRule !\.(js|ico|gif|jpg|png|css|htm|html)$ index.php 

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


AddType text/css .css
AddHandler php5-script .php
  • 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-15T12:23:41+00:00Added an answer on May 15, 2026 at 12:23 pm

    Try something like this above your existing URL rerwites:

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

    Edit: To prevent it from being interpreted as a Zend Frameowrk controlleradd the following above your existing RewriteConds to prevent it from transforming your admin URLs:

    RewriteCond %{REQUEST_URI} !^/admin
    

    And I think that should take care of everything.

    Edit: Your .htaccess file should look more like the following, though I don’t think any of the changes would relate to your 403 error, but maybe we’ll get lucky. If not, I’ll keep thinking of what might cause that.

    RewriteEngine on
    
    RewriteCond %{HTTP_HOST} ^mysite.com [NC]
    RewriteRule (.*) http://www.mysite.com/$1 [L,R=301]
    
    # Don't rewrite requests on admin subdomain to the Zend Framework handler
    RewriteCond %{HTTP_HOST} !^admin
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* index.php
    
    RewriteCond %{HTTP_HOST} !^admin
    RewriteRule !\.(js|ico|gif|jpg|png|css|htm|html)$ index.php [L]
    
    RewriteCond %{HTTP_HOST} ^admin
    RewriteCond %{REQUEST_URI} !^/admin
    RewriteRule ^(.*)$ admin/$1 [L]
    
    AddType text/css .css
    AddHandler php5-script .php
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Guys I've a Situation here.. I've Developed a Website using C# .Net framework 4.0,
Guys i need to call a function in such a view that if there
Guys Can you advise good data grid in zend framework expect the zdgrid. I
Guys, I am using SQL Server 2000 and executing the sp_columns stored procedure to
guys which text editor is good for Rubyonrails? i m using Windows and i
guys, I want to set actions to touches. If people make single touch -
Guys that is code copied from a book (Programming Windows 5th edition): #include <windows.h>
Guys, I am using dynamic programming approach to solve a problem. Here is a
guys, I'm trying to realize viewing comments on internet portal and I'm using UITableView.
guys i got a php file that use it as xml for a flash

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.