Re-Write url? Syntax? [closed] - url

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I was working on a website for a client. I wanted to re-write a url but don't know how to go about it. I have very less time. I am looking for a tutorial, but would be quite helpful if someone could help me.
Following is the url that I receive:
www.example.com/shop/url_encoded_category_name/product?productid=
I want to re-write it to:
www.example.com/shop-public-home.php?productid=
The problem here is that "url_encoded_category_name" will be some text and will be something different every time.
I am looking for a quick tutorial, and will close the question if I found a solution.
I am highly thankful for any help you can provide.
Jehanzeb k. Malik

You will probably use apache mod_rewrite, if you use an apache http server. All apache modules have excellent documentation including good examples. You will find all details you are looking for in that documentation: http://httpd.apache.org/docs/current/mod/mod_rewrite.html
You can either setup the rewriting rules in the central server configuration (preferred way) or decentralized using so called ".htaccess" files. You can use more or less the same rules for both approaches. Check the RewriteEngine, RewriteRule, RewriteMap and RewriteCond commands.

Related

starter ruby - my first ruby site [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am looking to make my first ruby - based website.
I am assuming looking at tutorials that print "hello" should work, but it does not.
Any pointers? I am assuming this is a silly noob question.
my file is located on mysite.com/test.rb
thanks!
(this is more of a dummy starter question than coding, so it is here rather than stack).
Have a look at Sinatra. You can get a hello world site up in 5 lines of code, and then start checking out tutorials from there.
Check out Ruby on Rails resource http://ruby.railstutorial.org/ruby-on-rails-tutorial-book. It is very easy to start learning.
If your file only contains the following
print "hello"
then it most certainly wont just work by browsing to site.com/foo.rb
You need things setup like a webserver to handle the request and route it to a ruby interpreter, etc...

Data mining RoR-app for dribbble-shots [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to data mine dribbble.com so I can make an app that registers when the best time is to upload a shot to dribbble is. I've seen someone do it for stories on news.ycombinator.com/ (Hacker News): http://hnpickup.appspot.com/.
I don't really know where to start since I'm still fairly new to RoR. I hope you can give me some pointers.
I'd like to run the app on Heroku, if that matters.
Michael Hartl's tutorial is a good place to start for this task. The internal logic would need to change to be yours but I think that is down the road a bit. As for charting there is FusionCharts and HighCharts to name a couple of options I am familiar with.
I ended up using Heroku scheduler to scrape dribbble, using their own API.

Hack Firefox to use custom URLs? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I am using an extension that depends on the page. I would like to use the extension for each board which means I need a board unique url. It currently looks like this
http://phpbb-site.com/forum/viewforum.php?f=BOARDNUMBER
I'd like to trick Firefox into having BOARDNUMBER in the location part of the url.
Then the extension will work and I won't have to tweak it. The problem is that I can't think of any way I can have Firefox use nice urls. I only need it to work on my computer. I don't own the site. What can I do? Can I use a proxy program? I was thinking maybe I could write a quick asp.net program which essentially does a GET request on the site and replaces all links to include the boardnumber and ignores that part of the url when making the request. It's probably a bad idea because I am sure lots can go wrong
Any ideas?
You should be able to do this using a simple script in Fiddler.

Translations of common application strings [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Ok, quick points for someone who is better at searching than I am...
I know I have seen before a list of translations of common application strings like "File," "Open," "Save," "Close," and "OK," into other languages. This was not just a scrape of Google translator, but an actual "official" list based on the localized OS. It seems to me that it was on Microsoft's site, but I'm not 100% sure.
I need to translate my application into Indonesian and wanted to give our translators a head start by filling in those common terms with the standard values, but now I cannot find the web page(s)! I've spent about 15 minutes and will continue to search (and will post the answer if I find it), but if someone else knows where that is (or finds it first!), please answer.
Microsoft Language Portal

How Ruby on Rails work [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I programmed in php. And when you use some framework, then, as far as php is intepreter, all the framework loads every request. But not rails, though, ruby is interperter too... So, how does it work
Nope. Rails as the framework caches all loaded modules, class and libraries on the first several requests (it's not on the first request only since it also has lazy load for above things).
But by default under development mode, all app modules (mvc) are reloaded on each request. Libraries (plugins, gems, etc) are not reloaded.
Your question is hugely wide open and too large to really answer effectively. This is a good place: RoR Guides. If after reading that you have more specific and directed questions bring them back and we'll try our best to help you...

Resources