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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:09:45+00:00 2026-06-13T14:09:45+00:00

I need to set-up my htaccess file so when a user inputs www.example.com/post/54 it

  • 0

I need to set-up my htaccess file so when a user inputs http://www.example.com/post/54 it renders as http://www.example.com/post.php?id=54

I setup the rule as such:

RewriteRule ^post/(.*)$  post.php?id=$1 [L]

When I test it on my localhost, the page only displays it as html and does not capture the images nor the CSS file. My directory is setup as C:/MyWebsites/example and it appears the file is loading not in the directory but in the C:/MyWebsite folder. What would be causing 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-13T14:09:46+00:00Added an answer on June 13, 2026 at 2:09 pm

    The browser tries to determine what the URI base is using the URI of the request. So when the browser requests http://www.example.com/post/54, the URI is /post/54 and the BASE is /post/. With this base, all relative links will have this appended to the front of the link and this makes it so relative links to things like css have the wrong base.

    You need to either change all your links to absolute links, or add a

    <base href="/">
    

    to the header of your post.php page.

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

Sidebar

Related Questions

I currently have my htaccess file set to remove the file type so www.example.com/home.php
how do I need to set up the .htaccess file to correctly send 404
Currently i have url parameters like this http://www.website.com/index.php?user&page=edit And in index.php i have set
I had the following rewriting set up in my .htaccess file: RewriteRule ^(\w+)/?$ profile.php?customURL=$1
Need to set some attributes of button. For example Checked. I guess it is
Is it possible to set a SetEnv variable in an .htaccess file differently depending
I've got a number of users, each with the website page like http://www.mysite.com/folder/artist_id.php?id=33 The
I'm following a tutorial on Zend Framework here (http://www.ibm.com/developerworks/opensource/tutorials/os-php-zend2/section2.html). I barely got started, but
At present my joomla urls are showing up like http://www.website.com/index.php/gallery instead of http://www.website.com/gallery.php So
I may need to modify our .htaccess file. Problem is I can't find 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.