Jump to content

/articles/ instead of articles.php


UnknownPlayer

Recommended Posts

Hi there, I had the same problem, Google knew the answer.

 

The css isn't loaded because its path also gets rewritten. To solve this, you have to put in a rewrite condition:

RewriteCond %{REQUEST_URI} !\.(css|jpg|gif|png|js)$ [NC]

 

though that didn't work for me. Using full path names does work though; instead of file.css use http://localhost/sitename/file.css

Link to comment
Share on other sites

Here is how I would do it

 

first turn on the RewriteEngine

RewriteEngine on

 

To solve the problem with css and images don't rewrite existing files

RewriteCond %{REQUEST_FILENAME} !-f

 

Assuming your 'id' is an integer you would want to do something like this

RewriteRule ^vest/([0-9]+)$ vesti.php?id=$1 [L]

 

This should rewrite urls like /vest/123 to vesti.php?id=123 . I didn't test this but it should work without any problems

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.