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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:25:00+00:00 2026-05-22T02:25:00+00:00

This is the contents of my .htaccess file: RewriteEngine on RewriteRule ^upload$ upload.php RewriteRule

  • 0

This is the contents of my .htaccess file:

RewriteEngine on
RewriteRule ^upload$ upload.php
RewriteRule ^/(\d+)/?.*$ /view.php?id=$1 [L]

The first rule successfully works. When I navigate to http://localhost/upload it shows the upload.php page.

The second rule however, does not. When I browse to: http://localhost/1234/some-string I get a 404 error. It’s meant to show this page: http://localhost/view.php?id=1234.

Hopefully you can see what I’m trying to do with the rule, I want the last string on the end of the URL to be completely ignored, and take the 1234 as a parameter for view.php.

Can anyone spot why this isn’t working? I’ve tried everything I can think of, but to no success. Thanks!

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

    it will be trying to find the directory /1234/ and failing. change the / to a - and it should work

    EDIT: got that completely wrong … it’s actually that you have a / at the beginning of your pattern, whereas MOD_REWRITE receives the path without the first slash.

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

Sidebar

Related Questions

I have this little .htaccess file: RewriteEngine on RewriteRule ^(.*)$ urlroute.php?q=$1 [E=myvariable:'withthisvalue',B,QSA] To direct
I have the following in my htaccess file: RewriteEngine On RewriteRule ^(.*)$ rewrite.php?data=$1 [L,QSA]
This is the content of my .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME}
i have the following .htaccess file for me web Options +FollowSymLinks RewriteEngine on RewriteRule
I have a simple .htaccess file with the contents below. <IfModule mod_rewrite.c> RewriteEngine on
I'm having trouble using .htaccess. This is the content of my .htaccess file RewriteEngine
I have seen a .htaccess file with contents as following RewriteEngine On RewriteCond %{REQUEST_FILENAME}
My current htaccess file looks like this: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f [NC] RewriteCond
I have problem with this: RewriteEngine On RewriteRule ^tuote/([^/]+) tuote.php?data=$1 [L] it should change
I'm having this .htaccess file: Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteBase /d/IT2 Tryggheim/it

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.