Questions tagged [clean-urls]

Semantic URLs (aka Clean URLs) are purely structural URLs that do not contain a query string and instead contain only the path of the resource.

Semantic URLs (aka Clean URLs) are purely structural URLs that do not contain a query string and instead contain only the path of the resource.

Related tag's:

391 questions
1
vote
1 answer

Creating slug with strtolower() and preg_replace()

Possible Duplicate: Regular Expression Sanitize (PHP) I want to make my links SEO. Before I started the links looked like this: http://www.domain.tld/index.php?page=blog My goal was to change it to: http://www.domain.tld/blog. That works now. I…
John Smith
  • 363
  • 2
  • 7
  • 21
1
vote
1 answer

get params with clean url in multi hosting environment

the website root contains three directories say a,b,c all acting as root for different domains i created one .htaccess in directory b and added the following rules to it RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond…
000
  • 3,976
  • 4
  • 25
  • 39
1
vote
3 answers

How to write seo friendly url's using htaccess?

I want to create seo friendly url's for my website. I want to create it from .htaccess file. I have very less knowledge about .htaccess I have following url…
absolutek
  • 97
  • 2
  • 4
  • 11
1
vote
3 answers

How to achieve clean URLs without a 'fat' controller?

Recently i've been learning how to implement an MVC structure in my applications. I'm planning to use a PHP framework in the near future, but for now it's just pure PHP. I've learned that controllers should be 'skinny' and models should be 'fat',…
user1440560
  • 163
  • 1
  • 7
1
vote
1 answer

Problems with Drupal 7's clean URLs

I've looked around and I couldn't find an answer to my question so here it is. Clean URLs are enabled on my Drupal 7 website and are "working" in the sense that I can access the About Us page with www.mysite.com/about-us and with…
Alex
  • 828
  • 2
  • 10
  • 20
1
vote
1 answer

using mod_rewrite to point at a blog

I'm trying to use mod_rewrite to point the blog portion of a site to a blog site. this is what I have to handle the normal stuff RewriteRule ^(\w+)/?$ index.php?page=$1 This is what i'm trying to use for the blog site RewriteRule ^blog/?$…
Brodie
  • 8,399
  • 8
  • 35
  • 55
1
vote
3 answers

PHP: clean urls and query strings

Why isn't the query string added to the GET array when using clean urls? Eg. Using /foo/bar?stack=overflow and the $_GET['stack'] variable is empty. I'm implementing clean urls with this code: $request = rawurldecode($_SERVER['REQUEST_URI']); //…
user555
  • 1,564
  • 2
  • 15
  • 29
1
vote
3 answers

Stop clean URLs from affecting relative paths in page HTML

I have implemented clean URLs using the following in my .htaccess RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] And in my index.php the $_SERVER['PATH_INFO'] is parsed to…
Bill Dami
  • 3,205
  • 5
  • 51
  • 70
1
vote
2 answers

.htaccess misreads directories

I have a setup that sets variables for the index page, but it also does the same for directories and I don't want it to do that. Here's my .htaccess file: RewriteEngine On RewriteCond %{REQUEST_URI}…
Higgsy
  • 324
  • 1
  • 14
1
vote
2 answers

Clean URL with Rewrite

i want to make mysite.com/photo.php?id=l0el2rwbFj7kGG3 become mysite.com/photo/l0el2rwbFj7kGG3 The rewrite i am using is RewriteEngine On RewriteRule ^photo/([a-zA-Z0-9]+) photo.php?id=$1 [L,NC] Can anyone help me out please?
Greg
  • 481
  • 1
  • 5
  • 21
0
votes
1 answer

Does node.js provide a way to write non-trivial clean URLs?

I would like to write non-trivial dynamic clean URLs in node.js. For example mynodeserver.com/browse/itemid instead of mynodeserver.com/browse?id=itemid Right now my static clean urls (browse,login,register,etc) are based on string comparison,…
supertopi
  • 3,469
  • 26
  • 38
0
votes
2 answers

.htaccess mod_rewrite linking to wrong page

I have in my .htaccess the following code: RewriteEngine On RewriteRule ^/?([^/\.]+)/?$ $1.php [L] RewriteRule ^/?([^/\.]+).php$ $1/ [R,L] RewriteRule ^/?([^/\.]+)/?$ $1.php [L] is working fine. What this is doing is taking a url like…
Connor Deckers
  • 2,447
  • 4
  • 26
  • 45
0
votes
1 answer

Drupal 7 menu but no clean-urls

I am in the process of developing a module which needs to make an ajax call to a menu path defined by the same module. Below is the hook_menu function: function staff_filter_menu(){ return $items['staff/filtering/results'] = array( …
sisko
  • 9,604
  • 20
  • 67
  • 139
0
votes
2 answers

mod rewrite clean url for search box

I have mod rewrite enabled to remove all page extentions.... This is done in httpd.conf as I am using apache on windows the setup I have is Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteCond…
DJ-P.I.M.P
  • 105
  • 2
  • 6
  • 15
0
votes
2 answers

Forcing the rewriting of URLs by hiding .php AND .htm(l) extensions and redirecting to extensionless URLs

here is my configuration: http://domain.com (obviously fictitious name...) hosted on a server running Apache with mod_rewrite enabled folder named "foo": (located at http://domain.com/foo/ and in which I want to put my .htaccess file) containing…
Iam Zesh
  • 1,797
  • 2
  • 20
  • 42