pretty-url

Which URL rewriting scheme is preferable? Wiki/Blog style?

I'm writing some URL rewriting software, and I want to know which URL scheme is preferable from many points of view: Blog style: my-chemistry-answer -- Why? -- (not preferable, technical) Wiki style: My_Chemistry_Answer -- Why not? -- (preferable, formal) SEO: Some say Google only splits words delimited by dashes which is why blog po...

mod_python publisher and pretty URLs

Hi all, I am new to Python (I am getting out of PHP because of how increasingly broken it is), and I am racing through porting my old code. One thing: I have a file /foo.py with functions index() and bar(), so, with the publisher I can access http://domain/foo/bar and http://domain/foo as the documentation suggests. How can I have it ...

remove index.php from cakephp url

how to remove the index.php from the cakephp url? In order to access my forms folder, I have to give the url : http://localhost/cake_1_2/index.php/forms. how do i remove that index.php? I removed the .htaccess from the folders as mentioned in core.php and uncommented the App.baseUrl line. Yet,I'm not able to view the page without the i...

.htaccess mod_rewrite problem - shot myself in the foot?

I have a page called category.php5 that uses $_GET["category"] to fetch the right content from the database. I want to pretty it up so is looks like: sinaesthesia.co.uk/category/psoriasis which would equal: sinaesthesia.co.uk/category.php5?category=psoriasis I have successfully done this sort of rewriting before, but since I can't ge...

Still having mod_rewrite problems / .htaccess

I have several rewrite rules in my .htaccess file that all work fine and I want to add a specific case to turn sinaesthesia.co.uk/category/psoriasis into sinaesthesia.co.uk/category.php5?category=psoriasis So I tried: RewriteRule ^(.)category/(.)$ /$1category.php5?category=$2 [L] which doesn't work. I've tried it without capturing...

pretty links with NO id

I'm considering my options to implement pretty links for a new website. I understand how to make the basics work, for example doing: /view/postTitle/7895 I can just pick up the id 7895 and just ignore the title. However, I see that some websites manage to get rid of ids altogether: /view/postTitle How does this work? The only way ...

mod rewrite causing error with pretty urls in SMF forum

I installed a mod (pretty urls) to rewrite the urls of this SMF forum and it works for all the boards except this one: http://mmaturf.com/forum/genghis-con's-turf/ I believe it has to do with apostrophe, but my mod rewrite skills are negligible. The rule that was created looks like this: # Rules for: boards RewriteRule ^([-_!~*'()$a-...

Why www.example.com/index.php/my/path/here is processed by index.php?

Hello. I am just curious, how is feature of apache is called that is directing requests like this www.example.com/index.php/my/path/here to a file index.php? At the first moment, you might think, that it would be correct if this request leads to 404 error page because there is no folder called index.php at the site root dir. BTW, is...

optimizing Pretty URLs in .htaccess

This is the code I use, <IfModule mod_rewrite.c> RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^([^/]+)/?([^/]+) index.php?user=$1&do=$2 [L] </IfModule> if i give it abcd/1234 it will capture abcd first then 1234 as the second variable. But if the url was abcd/ or abcd the first capture stays th...

How to setup github.com like username url?

I've seen and googled and found many pretty url links. But they all seem to look like http://example.com/users/username I want it to be like github style http://example.com/username Any directions that I can follow?? ...

How do you access second parameter of a servlet's web.xml file?

Say in my web.xml file, I define a servlet like so: <url-pattern>/MyURL/*</url-pattern> How do i access anything passed in the * in my servlet? I'm planning to use use this scheme for pretty(-ish) URLs. ...

How to insert JSP functionality in Servlets?

How can I use Servlets to access the HTML uses of having JSP without having to have all my client-facing pages called *.jsp? I would rather do this than using all the response.write() stuff because I think it is easier to read and maintain when it is all clean "HTML". Is this is fair assesment? EDIT: What I'm going for is having the Ser...

mod_rewrite and pretty urls

What I'm trying to achieve: 1) http://localhost/en/script.php?param1=random is mapped to http://localhost/script.php?param1=random&amp;language=English This has to work always. 2) http://localhost/en/random/text/here will be mapped to http://localhost/categories.php?term=random/text/here This has to work if random/text/here is 40...

Strange routing

How I can setup my rails app to respond to such urls: http://mydomain.com/white-halogene-lamp http://mydomain.com/children-lamps http://mydomain.com/contact-form The first one should link to my products controller, and show my product with this name The second one should link to my categories controller, and show the category with t...

.htaccess pretty url problem (mod_rewrite)

I have a directory that lists products by categories. if a _GET variable exists, it is used in a query. I would like to use "pretty url's", like: example/a/1/b/2/c/3/d/4 becomes example/index.html?a=1&b=2&c=3&d=4 most .htaccess examples I see only use variables to replace the _GET values, but I can use rules like this: Options +Follow...

Regular Expression For URL Query

I've been using mod_rewrite in my htaccess file to rewrite my urls and I've run into a problem when doing pagination. Here's the url for my page: http://domain.com/concerts/features/folk-roots?page=2 htaccess file: RewriteRule ^features/([^/]*)?page=([0-9]*)$ featureCat.php?cat=$1&page=$2 [NC,L] It works fine without the page query,...

rails: removing underscore from controller name

when I generate a two word named controller, like FooBar rails creates a controller and path like foo_bar this is not pretty. I would like to have the paths at least be FooBar. Possible? Suggestions? ...

removing .php extension with modrewrite and seo issues

Hello everyone, I'm trying to use modrewrite to change my urls from /foo.php to /foo and from /foo.php?lang=en to /en/foo. The problem I have is that I think I need to use 301 redirect to move the .php-less address to the .php address, or else my ranking will be splitted among these 2. But if I use [R=301] the address in the bar changes ...