URL rewriting question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • realin
    Contributor
    • Feb 2007
    • 254

    URL rewriting question

    hi guys,

    i want to use URL writing now, cause the other weird characters give a bad impression to the search engines and feeds.

    can you tell me what is the code to be written in .htaccess.. is it the same we do in regular expression.. my URL is like

    http://domain.com/view.php?action =read&id=8

    My .htacccess has already few lines, may be my cpanel write it when i was managing index or the wordpress blog did it when i used the customized URL in it..

    .htaccess look something like this ..
    Code:
    RewriteEngine on
    
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    Options All
    AuthName domain.com
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    
    RewriteCond %{HTTP_REFERER} !^http://blog.domain2/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://blog.domain2$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain.com$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain.com$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.blog.domain2/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.blog.domain2$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.realin.domain.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.realin.domain.com$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain.com$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain2/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain2$      [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
    thanks for ur help :)
  • tj111
    New Member
    • Aug 2007
    • 12

    #2
    What you have now is just to prevent hotlinking to pictures hosted on your site. How do you want the URL to look after rewriting?

    Comment

    • udaypawar
      New Member
      • Feb 2007
      • 29

      #3
      I am too finding answer to my questions and its getting urgent for me.

      I have one URL hosting.idealso lutions.in/domain.php When user points to link http://idealsolutions.in/domain_registration.htm he should be displayed the page from hosting.idealso lutions.in/domain.php link but http://idealsolutions.in/domain_registration.htm should be displayed in address bar. I have very less knowledge of apache. I have read some articles but couldn't understand exactly how can i do that.

      Is that possible?

      Comment

      Working...