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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:36:58+00:00 2026-05-27T01:36:58+00:00

I have problem with my .htaccess redirections. When I type: http://www.domain.com/contact it goes to

  • 0

I have problem with my .htaccess redirections. When I type:

http://www.domain.com/contact

it goes to the index.php and not the contact.php

here’s my .htaccess:

Redirect 301 /clients http://clients.domain.com

RewriteEngine On
SetEnvIf Host ^www\. page=www
SetEnvIf Host ^mob\. page=mobile

RewriteBase /
SetEnvIfNoCase User-Agent "^Wget" bad_bo
#etc ... 
Deny from env=bad_bot

RewriteCond %{HTTP_HOST} !^www.domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301]

RewriteRule ^about/?$ about.php 
RewriteRule ^contact/?$ contact.php 

rewriterule ^(.*)$ index.php?subdomain=%{ENV:page}&page=$1 

in my php i get:

<?php

print_r($_GET);
Array (
  [subdomain] => www
  [page] => contact.php
) 

What am I missing?

  • 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-27T01:36:58+00:00Added an answer on May 27, 2026 at 1:36 am

    Try this rule:

    RewriteCond %{HTTP_HOST} !^www.domain.com [NC]
    RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
    
    RewriteRule ^about/?$ about.php [NC,QSA,L]
    RewriteRule ^contact/?$ contact.php [NC,QSA,L]
    
    rewriterule ^([a-z0-9]+)$ index.php?subdomain=%{ENV:page}&page=$1 [NC,QSA,L]
    

    I also added the NC, QSA, L flags to make sure the last rule [L] is executed if match, [NC] for non case and [QSA] for Query String Append.

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

Sidebar

Related Questions

I have problem with my .htaccess redirections. Say I want to change http://www.domain.com/login.php into
I have an htaccess file which maps http://www.myserver.com/home/ to http://www.myserver.com/index.php?section=home This part works fine.
I have an web application in PHP with urls like this: https://www.domain.com/?mod=test&act=view My problem
I have some problem with my .htaccess file. Here I am adding my problem.
I have problem with http://abfoodpolicy.com/ . In IE 8 and 9 the right sidebar
Have a very strange problem with Apache .htaccess URL Rewriting and Redirection. Here's my
I have my website in a subfolder from the main root. www.domain.com ---redirects to--->
I have this url structure: proyectos.example.com/ci-doctrine/index.php proyectos.example.com/ci-doctrine/index.php/welcome proyectos.example.com/ci-doctrine/index.php/blog proyectos.example.com/ci-doctrine/admin.php proyectos.example.com/ci-doctrine/admin.php/welcome proyectos.example.com/ci-doctrine/admin.php/dashboard For index.php urls,
I have a website xxxxx.com and the URL structure to dynamic content is xxxxx.com/tours/index.php?tourid=x
I just did the following in htaccess: ErrorDocument 404 http://www.website.com My first question is,

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.