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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:25:59+00:00 2026-06-01T18:25:59+00:00

I am developing a web app in which name of other website are supposed

  • 0

I am developing a web app in which name of other website are supposed to be given as parameters, am rewriting urls using .htaccess file on my apache web server, this is the code i wrote in my .htaccess file:

RewriteEngine On
RewriteRule ^([a-z0-9\_\-]+(\.)[a-z0-9\_\.\-]+)[^(site.php)] site.php?url=$1
RewriteRule ^([a-z0-9\_\-]+(\.)[a-z0-9\_\.\-]+)[^(site.php)]/ site.php?url=$1

I wrote [^(site.php)] this because it was passing site.php as parameter as site.php was a match for my regex. This is working the right way but the only problem is that the last character of the parameter is omitted, for example, when am writting:

www.mywebsite.com/google.com

its taking google.co and omitting the last m. If am passing google.co.in, its taking google.co.i and omitting the n. What can be the reason for this?

  • 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-01T18:26:01+00:00Added an answer on June 1, 2026 at 6:26 pm

    Since you use [^(site.php)] (and it doesn’t means what you think), it will match the last character of your url. You should use a RewriteCond, you can try :

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([a-z0-9\_\-]+(\.)[a-z0-9\_\.\-]+)/?$ site.php?url=$1
    

    Wich means : do not rewrite for existing file or directory

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

Sidebar

Related Questions

I am developing a c# winform app which controls a website using web browser.
I am developing an asp.net web app in which I am using a span
I am developing an asp.net MVC web app in which I am using Linq
I am developing web app using asp.net. I have plenty of javascript files which
I am currently developing a web-app in which i am using a SQLite database.
I am developing a web app for which I plan to use InnoDB. However
I'm developing a web app for which the client wants us to query their
I'm developing a web app and currently using sql server 2008 for it. But,
I am developing a web app using servlets and jsps. I have a question
I am developing a web app (using rails) that I will be launching within

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.