Remove end part

I been asking AI to help me fix it where this doesn’t show when “commands” is clicked

Image

it worked to be https://dash-corpz.wuaze.com/commands but the css design thing wasn’t being used and I had to reset to be the stupid pages/commands.html

I’m not exactly sure what you are trying to do. You can always clear your cache if CSS changes are not taking effect.

6 Likes

Hi DarkCorpse,

You’re asking 2 things at a time:

  1. How to change from/to having file extension suffix
  2. How come the CSS is not referencing properly in your HTML page and breaks styles.

For #2, the CSS referencing only works when the URL rewrite settings is correct and the path points to the correct file, with exceptions set correctly in your .htaccess file. Simply rewriting everything to have no suffix would simply means assuming all files with .html extensions and something like css/style.html called from css/style definately doesn’t sounds like it’s gonna work.

Having the above in mind, for #1, you need to change the .htaccess file so that it only attempts to re-write when the file called does not exist.

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html [NC,L] 

Notice there’s the RewriteCondition for checking if the file is html before removing.

In the above code, the first line checks that the request is a URL and not a directory. The second line redirect matching URLs with .html extension to those without file extension. The last line redirects matching requests to URLs without html file extension.

In this case you can change HTML to call the CSS using something like css/style.css, keep the css extension so it calls to the existing file, and does not attempt any rewriting.

Cheers!

8 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

As before, I have created a topic which closed after 7 days so I created this

Here is the link for a solution which didn’t exactly work from @chiucs123

I was wanting more help as it really didn’t work so much

This didn’t really work

Of course it did not work.
Did you follow instruction?

5 Likes

Yeah… I did paste that one code in my htaccess

Great!!! You did not know how to follow instruction.
So read that post again

4 Likes

ugh… ok

As still, I am kinda confused about it

What did you try, where are you stuck?

4 Likes

I just read it and all I can know it is saying is to put the code in htaccess but the rest I am confused about.

Read above cause I forgot to mention you

So it did work with not exactly? What do you mean?

lol :joy: I wasn’t here for a few days due to some other stuff that got me occupied and I came back and saw this, ROFL.

That’s not the only thing I was telling you, eh? You can’t just paste the code whenever you see a code block and expect it to work. I explicitly explained why that code is to be working with some adjustment in your code as well.

Specifically this part:

Cheers!

3 Likes

ok ig