473,320 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

URL rewriting question

realin
254 100+
I have posted this question in apache forum, but no one replied, i guess it isnt this much happening as PHP forum is :P


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 ..


Expand|Select|Wrap|Line Numbers
  1.  RewriteEngine on
  2.  
  3.  
  4.  
  5.  <Limit GET POST>
  6.  
  7.  order deny,allow
  8.  
  9.  deny from all
  10.  
  11.  allow from all
  12.  
  13.  </Limit>
  14.  
  15.  <Limit PUT DELETE>
  16.  
  17.  order deny,allow
  18.  
  19.  deny from all
  20.  
  21.  </Limit>
  22.  
  23.  Options All
  24.  
  25.  AuthName domain.com
  26.  
  27.  IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
  28.  
  29.  
  30.  
  31.  RewriteCond %{HTTP_REFERER} !^http://blog.domain2/.*$      [NC]
  32.  
  33.  RewriteCond %{HTTP_REFERER} !^http://blog.domain2$      [NC]
  34.  
  35.  RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$      [NC]
  36.  
  37.  RewriteCond %{HTTP_REFERER} !^http://domain.com$      [NC]
  38.  
  39.  RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$      [NC]
  40.  
  41.  RewriteCond %{HTTP_REFERER} !^http://domain.com$      [NC]
  42.  
  43.  RewriteCond %{HTTP_REFERER} !^http://www.blog.domain2/.*$      [NC]
  44.  
  45.  RewriteCond %{HTTP_REFERER} !^http://www.blog.domain2$      [NC]
  46.  
  47.  RewriteCond %{HTTP_REFERER} !^http://www.realin.domain.com/.*$      [NC]
  48.  
  49.  RewriteCond %{HTTP_REFERER} !^http://www.realin.domain.com$      [NC]
  50.  
  51.  RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$      [NC]
  52.  
  53.  RewriteCond %{HTTP_REFERER} !^http://www.domain.com$      [NC]
  54.  
  55.  RewriteCond %{HTTP_REFERER} !^http://domain2/.*$      [NC]
  56.  
  57.  RewriteCond %{HTTP_REFERER} !^http://domain2$      [NC]
  58.  
  59.       RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
  60.  
  61.  
thanks for ur help :)
Oct 23 '07 #1
2 1318
ak1dnar
1,584 Expert 1GB
Have a look at http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

Realin, without editing your own post you can get email notifications. read here please.DO YOU KNOW ? Email notifications for your Threads
Oct 24 '07 #2
realin
254 100+
Have a look at http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

Realin, without editing your own post you can get email notifications. read here please.DO YOU KNOW ? Email notifications for your Threads
Neah,
that couldnt help me much, as i am not that geek to understand, i need a simple conversion, i know its a one line.. but can get hands on it ..
Oct 24 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ricky Romaya | last post by:
Can I have somekind of URL rewriting mechanism without touching the web server's configuration (implemented in pure PHP) and win32 compatible? All the info I have teaches about apache's mod_rewrite...
6
by: Jon Maz | last post by:
Hi All, I am experimenting with URL Rewriting using the techniques outlined by Scott Mitchell in his article "URL Rewriting in ASP.NET"...
3
by: Jamie Jackson | last post by:
I'm rewriting all links' onclick events, but I'm having a problem. The onclick event that I'm inserting works correctly in Opera, but not in FF or IE. I'm retroactively adding the statement...
2
by: Jon Maz | last post by:
Hi All, I've been looking into options for URL Rewriting in .net, and to be honest, I haven't seen anything that's easier than the old Classic Asp solution with an ISAPI filter redirecting to an...
0
by: Lee | last post by:
Hi all ;) Preamble -------- I'm using URL rewriting to enforce a frames policy (yeah, I know frames are 'bad' :) - i.e. if a request comes in for a page which should be nested within a...
2
by: KMA | last post by:
My site has dynamicaly generated pages. Most of the URLs are false, and I used to trap them in a generic 404 page, which stripped off a unique part of the URL, built the page then sent that back to...
3
by: Greg Collins [Microsoft MVP] | last post by:
I have done a bit of research of Url Rewriting, but as yet have been unsuccessful at getting it to work well, and there are issues around what file types are supported and how much code you want to...
1
by: Greg Collins [Microsoft MVP] | last post by:
I have a site that uses a custom 404 error page to perform URL Rewriting. This works excellent for all my needs except for one area. When transforming XML, I have some XSLT code that uses the...
9
by: Frankie | last post by:
I understand that with URL rewriting we can have a request come in for, say Page1.aspx, and rewrite it so that PageA.aspx gets served up to the user. My question (assuming the above is correct):...
0
by: Stephan Zahariev | last post by:
Hi all, I'm developing large web site for manufacturing based on web parts. As well the site uses URL rewriting via IHttpModule handler and custom PersonalizationProvider to persist web part...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.