0

Hi there im using this code to rewrite

This: index.php?page=articles&id=1

To: articles/1

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ index.php?p=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)$ index.php?p=$1&sp=$2 [L]

The css changing and instead of searching /assets is searching for articles/assets. All of the website taking from one template as OOP template so what can I do? Thanks for helping.

2
  • 1
    Please provide CSS <link> code Commented Feb 27, 2016 at 18:16
  • <link rel="stylesheet" href="assets/css/main.css" /> Commented Feb 27, 2016 at 18:54

1 Answer 1

3

Use "RewriteBase /" this will help.

Or you can use :

<base href="/"> 

tag in your HTML page header.

Sign up to request clarification or add additional context in comments.

1 Comment

@user3050136 If this solution solved your problem, you might want to accept it as the answer using the big checkbox. For more info: how does accepting an answer work?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.