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

How to call a variable from database having whitespace

I am using php $_GET function to call parameters from the database. And these perameters are usually variable within the url. E.g. http://localhost:8080/series/dynamics/admin/cleanURL/Apple, where Apple is the variable from the database. This works…
Gautam P Behera
  • 171
  • 2
  • 13
1
vote
1 answer

htaccess fails to redirect when encounter whitespace

I am using htaccess for clean url. Which is working fine as long as the parameters doesn't carry whitespace. In which case it converts the space in %20 and I receive 404 error. So basically the URL:…
Gautam P Behera
  • 171
  • 2
  • 13
1
vote
2 answers

How to keep only last parameter dynamic in clean url when multiple parameters present

How can I make the last parameter of my url dynamic when I have more then 1 parameters For instance: http://localhost:8080/series/dynamics/testurl/Shoes/Sports has 2 parameters namely "shoes" & "Sports". What I would like to achieve is keep Shoes as…
Gautam P Behera
  • 171
  • 2
  • 13
1
vote
2 answers

Clean urls in php with / at the end

I am trying to figure those clean urls out again. I am trying to "convert" http://www.website.com/videos.php?url=testurl into http://www.website.com/videos/testurl/ All of that works fine as long as I write the url without the / at the end. But for…
Dennis
  • 595
  • 1
  • 6
  • 22
1
vote
1 answer

Subfolder/Subdirectory and clean URL's

after doing tons of tests and looking a lot into stackoverflow, I can't figure out how to achieve this. I have a website served in a subfolder (www.domain.com/subfolder/). I have the .htaccess located in that subfolder…
1
vote
3 answers

How to clean url wordpress

I'm using wordpress for a site, this url before tes.com/index.php/about/ i want url like this tes.com/about/ I have tried copying parts of WordPress' .htaccess, however shows a 404 error. My .htaccess file looks like: # BEGIN WordPress
Afrgun
  • 313
  • 3
  • 16
1
vote
0 answers

Htaccess Redirection and PHP code is creating multiple virtual directories

I am trying to make a clean url without a .html on the end of the usl instead it would have a trailing slash. For example:- mydomain.com/webpage.html instead I am looking for:- mydomain.com/webpage/ Also what I am looking to do is to send that link…
1
vote
1 answer

About mod_rewrite htaccess clean URL parameter

My URL: www.example.com/index.php?fruit=banana&color=yellow&amount=2 It should be: www.example.com/banana/yellow/2 -----> success So why is it: www.example.com/banana/2 -----> ERROR .htaccess: RewriteEngine On RewriteRule ^/(.*)/(.*)/(.*)$…
1
vote
1 answer

SEO friendly URL instead of query string .htaccess

How can I modify the .htaccess file and get SEO friendly URLS instead of a query string. I want to achieve this 3 goals: localhost/example/products/ instead of localhost/example/products-list.php localhost/example/products/38/ instead…
1
vote
2 answers

How to properly overwrite clean() method

I'm trying the Tango With Django Tutorial and the overwrite in the clean() method isn't working to add 'http://' in my urls. What is wrong in this code? forms.py class PageForm(forms.ModelForm): ... def clean(self): cleaned_data =…
ArrowsX
  • 505
  • 1
  • 4
  • 9
1
vote
1 answer

htaccess: php language variable on index page

I'm trying to clean up urls from extensions and php get language variables: test.com/en/ => test.com/?lang=en test.com/ro/page/ => test.com/page.php?lang=ro Here is my .htaccess: AddDefaultCharset utf-8 Options +FollowSymlinks…
vlad
  • 1,511
  • 5
  • 17
  • 26
1
vote
1 answer

CLEAN URL - Include the Drupal-specific settings directly into .htaccess

I read the Configure clean URL It ask to add the code below into .htaccess file. RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$…
user73963
  • 165
  • 1
  • 1
  • 5
1
vote
0 answers

Failed to add AllowOverrideAll

I read this article How to Set AllowOverride all I open /etc/apache2/apache2.conf The following code can't find in apache2.conf So I add the code below by myself. Options Indexes FollowSymLinks AllowOverride…
user73963
  • 165
  • 1
  • 1
  • 5
1
vote
1 answer

How do I resolve this .htaccess conflict?

I have the following .htaccess rule in order to enable "clean" URLs, i.e. strip the .html extension from file names: RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.html [NC,L] It works perfectly in 90 percent of directories on the…
Matthew S
  • 843
  • 2
  • 12
  • 26
1
vote
2 answers

cleaning a post URL from an Array

Here is my code : $query = "SELECT first_name, surname, email FROM app2"; $result = mysql_query($query) or die(mysql_error()); $url = "https://test.com?"; // Where you want to post data while($row = mysql_fetch_array($result)) { $input =…
MatHatrik
  • 762
  • 1
  • 6
  • 16