Hi everybody. I'm trying to setup some small layout - template framework in php - and everything is going smooth except one thing - url rewriting.
I suck at regexp, and I suck even worse at mod_rewrite. And I'm in kinda hurry to get this stuff out, so can you please help me?
I need one .htaccess file that has just two rules
Every ...
Hi there,
I am having a little problem, it maybe easy but i really don't know how do I get that?
right now my site runs on http://www.example.com this url, but i need to run that on http://example.com also.
can some body tell me here that how can i do that?
Thank you in advance.
...
so write now my Url looks like domain.com\MyAction?var1=x&var2=y&var3=z.
Now, in order to make it more seo and user friendly, I want to abandon that way of writing and adopt this kind of url - doman.com\MyAction\x\y\z (obviously order matters now, which didn't matter in the previous url)
What is the best way to do this?
Currently:
...
greetings all
i have some rules which are very similar
<rule>
<from>/a/**/b/**/c/**/d</from>
<to>/somePlace</to>
</rule>
<rule>
<from>/a/**/b/**/c</from>
<to>/anotherPlace1</to>
</rule>
<rule>
<from>/a/**/b</from>
<to>/anotherPlace2</to>
</rule>
and i want when an exact match occurs for the first ...
Can anybody tell me what this does?
RewriteRule .* .main.php [QSA,L]
From what I understand it will rewrite ANYTHING to main.php correct? But not so sure what the QSA,L does.
This is the whole .htaccess file, when I hit the main directory I get a 400 Bad Request error. Edit: Bad request went away when I added an ending slash in the b...
I have a blog hosted on SharePoint 2010 with default settings. The URL for my blog posts looks something like http://domainname/Blog/Lists/Posts/Post.aspx?ID=somenumber
How can I use meaningful names instead of these default URLs?
Can you please point me to some useful links on how to achieve this?
...
hey guys,
I have just completed this tutorial (and afew others) on how to use mod_rewrite with apache: http://www.workingwith.me.uk/articles/scripting/mod_rewrite
however they all focus on using the .htaccess file to rewrite URLs
my question is, how can you use this rewrite engine module from the apache.conf / httpd.conf files or from...
server removes duplicate slashes from url,
if i try to get http://mysite.com/a//b/
with .htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?r=$1 [L]
string that comes to php script is "a/b/" but expected "a//b/"
how can i disable removing ...
i tried to create this url rule buts not working: i dont know why :(
orginal url
www.example.com/viewprofile.php?username=jhon
the desired friendly url is
www.example.com/user/jhon
this is my.htaccess code:
RewriteEngine On
RewriteRule ^username/([^/]*)$ /viewprofile.php?username=$1 [L]
thanks for helping!! :))
...
Hi all,
First off, if this is a duplicate, I apologize. I did quite a bit of searching but couldn't find much and I suspect I wasn't using the right terms...
I'm building a site with Spring MVC and using the annotation-driven configuration. What I'd like to do is have urls that do not have any extension at the end (.html, .do, etc). ...
I've tried to rewrite my current urls to nicer looking, but encountered a problem with broken relative paths (css/javascripts/img tags and so on)... I wonder what is the best way to fix the broken paths? After reading, I see that probably the best way is just to make all of them absolute (like http:// myhost.com / stylesheets / style.css...
Does anybody know what the best SEO practice and most effective format for URLs is currently?
All lowercase or mixed case? Example:
http://www.mysite.com/What-is-My-Site/
OR
http://www.mysite.com/what-is-my-site/
...
I'm using ISAPI_Rewrite, Windows server 2008.
Currently I am rewriting URLs to httpd.ini like this:
RewriteRule /this-is-my-super-fancy-url/([^/]+)? /foobar/index.html?nid=10$1
Problem is, now we need to remove certain words from the URL, yet still have the request filled. For instance, in the example above if I needed to remove the...
hi how can i get full url with & sign
RewriteRule category/(.*)$ categories.php?url=$1 [PT,L]
my url is category/pets-&-wets/ but when i get
echo $_GET['url']; it shows only pets-
any suggestions thanks
...
i have this problem with my url rewrite condition in .htaccess file, everything is working fine, but when i just type www.example.com on the browser to go to my homepage' it thinks its viewtopic.php file:
my viewtopic files are rewritten to be like this:
www.example.com/topic
this is my code:
RewriteEngine On
RewriteCond %{REQUEST_F...
I'm using IIS7 url rewrite module.
Here is my blog link: http://www.kad1r.com/
After rewrite here is some images paths.
http://www.kad1r.com/article/157/ASP.Net/images/comment.gif
But some images are ok (like google image).
...
Hi,
On my site I have pages like "shoutbox", "admin", "blog" etc.
I want the url to look like this:
http://localhost/shoutbox/post
Instead of:
http://localhost/index.php?page=shoutbox&action=post
Then I'll have PHP grab the string and explode() it seperating each part, grabbing the values between the "/"'s and then use the values...
Hi,
I haven't found all the answer to my current problem.
Here is the root of the site:
cache
img
display.php
admin.php
What I need is to block all the direct access of the files and allow only access via url formatted like that:
1 ht*p://sub.domain.com/image/param/size/folder/img.jpg (param, size, folder, img are parameters)
2 ht*...
I am a rewrite newbie, I am wondering why this rewrite rule is not working, it ceases Apache from starting
RewriteRule ^([-a-zA-Z0-9_]+)?/constant/([-a-zA-Z0-9_]+)/(.*)$ http://$2.domain.com/$1/$3 [R=301, NC]
What this rule should do is URL refactoring, examples:
http://www.domain.com/controller/constant/variable/action should be red...
Hi. I'm using iis7 url rewrite module and make user friendly urls. But in my sitemap this is not like that.
It is like .aspx?id=123&category=dasd
So indexed on search engines and sitemap has different urls. (normally both of them goes to same page) but they are different.
Is it problem or not? or what can I do?
...