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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:29:20+00:00 2026-06-11T02:29:20+00:00

I am having problem in URL rewriting using .htaccess file, problem is as below.

  • 0

I am having problem in URL rewriting using .htaccess file, problem is as below.

When I put below code in my .htaccess file on server

RewriteRule ^/?xyz http://google.com [R=301]

and I call url MY_WEB_DOMAIN.COM/xyza in browser it redirects me to google.com ( as expected )

And if I call url MY_WEB_DOMAIN.COM/xyz/abc I get 404 error..

isn’t it should redirect to google on both case?
or something else is affecting my code with I use / (slash) in my pattern?

Thanks in advance.

  • 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-11T02:29:22+00:00Added an answer on June 11, 2026 at 2:29 am

    Rewriting was working ok.

    I checked headers on server side for rewritten URL and directly called url.
    I found only one change.

    in direct url It was containing redirect_url and request_uri were same.. for rewriten url both were different.
    (I thought oxwall might be using request_uri to process.. where as it was not as I wanted to be..

    So I just made them same for rewritten url in php. by placing line
    $_SERVER[‘REQUEST_URI’]=$_SERVER[‘REDIRECT_URL’];

    And It is done. 🙂

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

Sidebar

Related Questions

I am having problem in parsing the xml data, below is my code URL
I am having a problem with rewritting the URL using .htaccess, When the URL
Hey, I'm having some difficulty with CSS and IE6 compatibility. URL : http://bit.ly/dlX7cS Problem
I'm new to url rewriting and having a problem i can't figure out. I
I'm having problem with sending XML-data using HTTP POST to an API. If I
I've been having an issue with URL Rewriting and Postbacks. Edit: Currently using IIS
Having a problem getting the URL for a resource for some reason: This code
I am having problem with xmlparsing with post method. API URL : http://XXX.XXX.X.XX/api/user.php Function
im setting a django server, but im having problem with my static's file's: django
Im having problem's adding map markers to gmaps using jquery. Here is my code

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.