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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:33:55+00:00 2026-05-27T05:33:55+00:00

This problem concerns me for a long time. I admit that it is probably

  • 0

This problem concerns me for a long time. I admit that it is probably because of lack of experience so I hope I could get some ideas.

Here is the code in .htaccess

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^view-([0-9]+)$ view.php?id=$1 [NC,QSA]

So when I access http://domain/project/view-44 it works fine, but I would like it to work with a slash in the end like http://domain/project/view-44/

So I changed the last line to

RewriteRule ^view-([0-9]+)/$ view.php?id=$1 [NC,QSA]

And now when I access http://domain/project/view-44/ all the images, javascripts and style is gone.

Now, instead of getting the css from http://domain/project/style.css it tries to get it from http://domain/project/view-44/style.css

I believe the issue is about incorrect way of specifying url for items. In my case it is simply

<link rel="stylesheet" type="text/css" href="style.css" >
<img src="images/web/showreel.png" alt="Image1" />

Does that mean that I have to specify a full url ( http://domain/project/images/web/showreel.png ) in every required element?

  • 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-27T05:33:56+00:00Added an answer on May 27, 2026 at 5:33 am

    It is always best to specify absolute URL as this way you know the document will always be reached. I know its longwinded but instead of declaring

    <img src='http://domain/project/images/web/showreel.png' />
    

    Setup a PHP gloabal variable like

    define('SITE_URL', ' http://domain/project');
    

    Then do

    <img src='<?php echo SITE_URL; ?>/images/web/showreel.png' />
    

    Also with regards to the .htaccess, take a look at http://blog.valtersboze.com/2009/06/add-or-remove-trailing-slash-in-url-with-htaccess/

    This explains how to remove or keep the trailing slash, but not both, never both, google doesnt like both, they’ll see it as duplicate content.

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

Sidebar

Related Questions

a long time ago I learned that this is a bad idea. Please don't
This problem occurred during daylight saving time change. After the change occurred, we've noticed
I have some data that isn't properly partitioned (for lack of a better word).
This problem crops up every now and then at work. Our build machine can
This problem has been solved thanks to your suggestions. See the bottom for details.
This problem has been kicking my butt for a few days now. I have
This problem involved me not knowing enough of C++. I am trying to access
This problem pertains to Java By using RandomAccessFile I intend to be able to
This problem occurs when I try to hide a file in my directory with
This problem has bugged me so many times and i have now decided to

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.