473,385 Members | 1,356 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,385 software developers and data experts.

URL rewriting question

realin
254 100+
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. <Limit GET POST>
  4. order deny,allow
  5. deny from all
  6. allow from all
  7. </Limit>
  8. <Limit PUT DELETE>
  9. order deny,allow
  10. deny from all
  11. </Limit>
  12. Options All
  13. AuthName domain.com
  14. IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
  15.  
  16. RewriteCond %{HTTP_REFERER} !^http://blog.domain2/.*$      [NC]
  17. RewriteCond %{HTTP_REFERER} !^http://blog.domain2$      [NC]
  18. RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$      [NC]
  19. RewriteCond %{HTTP_REFERER} !^http://domain.com$      [NC]
  20. RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$      [NC]
  21. RewriteCond %{HTTP_REFERER} !^http://domain.com$      [NC]
  22. RewriteCond %{HTTP_REFERER} !^http://www.blog.domain2/.*$      [NC]
  23. RewriteCond %{HTTP_REFERER} !^http://www.blog.domain2$      [NC]
  24. RewriteCond %{HTTP_REFERER} !^http://www.realin.domain.com/.*$      [NC]
  25. RewriteCond %{HTTP_REFERER} !^http://www.realin.domain.com$      [NC]
  26. RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$      [NC]
  27. RewriteCond %{HTTP_REFERER} !^http://www.domain.com$      [NC]
  28. RewriteCond %{HTTP_REFERER} !^http://domain2/.*$      [NC]
  29. RewriteCond %{HTTP_REFERER} !^http://domain2$      [NC]
  30. RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
  31.  
  32.  
  33.  
thanks for ur help :)
Oct 22 '07 #1
2 2092
tj111
12
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?
Oct 29 '07 #2
I am too finding answer to my questions and its getting urgent for me.

I have one URL hosting.idealsolutions.in/domain.php When user points to link http://idealsolutions.in/domain_registration.htm he should be displayed the page from hosting.idealsolutions.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?
Nov 11 '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: 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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.