problem with mod_rewrite

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • djdevil89
    replied
    okay i have it thanks a lot
    i didnt remove the redirect but went and removed the trailing slash on images and css using preg_replace
    Last edited by djdevil89; 16.07.11, 14:24.

    Leave a comment:


  • morse
    replied
    Originally posted by DjMatrix View Post
    thanks fpr pointing that out so what you think the htaccess code should be like?
    R=301 is a redirector , right ?? remove it problem solved . But then you have to manually edit each and every link in the web page to its absoluteness for you to have links pointed to right pages.

    Leave a comment:


  • djdevil89
    replied
    Originally posted by morse View Post
    you are using a re-director and that is what is giving you error. You will have to edit all prevalent links in the script.
    thanks fpr pointing that out so what you think the htaccess code should be like?

    Leave a comment:


  • atef
    replied
    FYI, this way makes ur page faster ;)

    Leave a comment:


  • morse
    replied
    you are using a re-director and that is what is giving you error. You will have to edit all prevalent links in the script.

    Leave a comment:


  • CreativityKills
    replied
    Originally posted by DjMatrix View Post
    Thats what i am doing right now but its not the best way to do i am looking for an alternative way
    theres nothing like the "best way", whether its the absolute url path to d style sheet, or just the relative path, it still sends a new independent request for d the css externally

    Leave a comment:


  • djdevil89
    replied
    Thats what i am doing right now but its not the best way to do i am looking for an alternative way

    Added after 21 minutes:

    okay i came up with this
    PHP Code:
    RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule ^(.*)$ $1/ [L,R=301
    but this puts a trailing slash to the .css aswell and therefore makes it unusable
    Last edited by djdevil89; 15.07.11, 20:55.

    Leave a comment:


  • atef
    replied
    edit css, images set the full path ex http://site link/dir/image and do same with css url at the page

    Leave a comment:


  • djdevil89
    started a topic problem with mod_rewrite

    problem with mod_rewrite

    Hey guys,

    as stated in one of my posts/threads before i am working on a wap/web community and im getting quite forward with it, my problem now is i use mod_rewrite to make the url friendly

    for example i have this

    PHP Code:
    Options +FollowSymlinks
    RewriteEngine on
    DirectorySlash on
    ErrorDocument 404 http
    ://domain.com/wap/error.php
    RewriteRule ^users/([0-9]+)-([a-z]+) users.php?id=$[NC
    this makes profiles available like http://domain.com/wap/users/?id=1 now the problem is if i open the profile like http://domain.com/wap/users?id=1 my theme messes up incase it wont load at all because the path is messed, now i am looking for a way to force the leading / with mod_rewrite or if needed even with php is there any way to do that?
Working...
X