i have used the following code in .htaccess
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^company/aboutus$ aboutus.php [NC,L]
RewriteRule ^company/contactus$ contactus.php [NC,L]
RewriteRule ^company/careers$ careers.php [NC,L]
RewriteRule ^/$ index.php [NC,L]
the above code works but aboutus page loading...
I'm probably being completely thick here but I can't seem to make an optional trailing slash work in my url rewriting
I've seen Gumbos comment about excluding the file you are rewriting to exclude infinite recursion, but still having no joy.
So for example I have this:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/index\.php$
Rewrite...
my developer is saying that it is not possible to rewrite url form
example.com/name/name/?lang=english to
example.com/en/name/name/
is it possible to do or not?
if yes, how should it be done?
if not, what could be the reasons?
we have windows based hosting from maddogdomains (godaddy)
...
I would like to change:
http://example.com/index.php?p=blog&pid=2&lid=1&l=en
into just
http:// example.com/en/blog.html
or just
http:// example.com/blog.html
thanks in advance!
...
I am trying to use mod_rewrite to pretty up a URL.
I want the URL to look like this:
http://example.com/bart/school?page=2
and the rewritten URL to be:
http://localhost:8080/app?user=bart&tag1=school&page=2
If possible, I would also like to be able to have more than one tag per user:
http://example.com/bart/school/lisa?pa...
I need a nginx rewrite rule to rewrite from:
http://some-keyword.example.com to www.example.com/keyword.php?keyword=$some-keyword
while domain without www in front still rewrites to www.example.com and www isn't taken as a keyword.
Please could you help me to solve this problem, how to write these two rules?
...
Hi
I'm using Joomla 1.5.14 and I configured SEO as in the following image
Now I need to map a few old URL to the new site
let's say that I need to map htp://mysite/old.html to the new Joomla page
http://mysite/index.php?option=com_content&view=article&id=32&Itemid=70
I added in my .htaccess file the following
Rew...
I am looking to create a 301 redirect based purely on a query string see b
OLD URL: olddomain.com/?pc=/product/9999
New URL: newurl.php?var=yup
My normal way of doing this would be
redirect 301 pc=/product/9999 newurl.php?var=yup
But this time I am trying to match a URL that that only contains the domain and a query string...
Wha...
So I have moved a website and am trying to 301 redirect everything, which I do quite often so this is a weird problem but probably something stupid I'm not seeing.
ALL of my redirects are working fine, except any redirect that the first string starts with "/Dining" or "/dining" are failing. For example, this redirect works fine-
Redir...
I'm running wamp on Vista (Apache v2.2.11) and have projects setup such that http://localhost/projectx is the base directory for projectx. Now, I want that requests for
http://localhost/projectx/somepage/extra
will rewrite to
http://localhost/projectx/PUBLIC/somepage/extra
To that end I have a file in C:\wamp\www\projectx\.htacces...
Hey guys!
I'm having trouble figuring out how to exclude /public/bin from this rewrite rule
RewriteCond %{REQUEST_URI} !firerift.php
RewriteRule ^(.*)$ firerift.php/$1 [L,QSA,NC]
Any help would be appreciated.
...
RewriteEngine on
Rewriterule ^(.*).htm $1.php
This works fine when i try to access every php page
But how could i make it RewriteRule ^/somepage $ /somepage.php (its not working )
if the page is about.php the url should be about/ (directory type)
Please help me . Thanks in advance!
...
Hello,
I'm hoping that this will be a simple question that someone can answer. I'm looking to build a CodeIgniter application that I can build pretty easily in regular PHP.
Example: I would like to go to http://locahost/gregavola and have rewritten using htaccess file to profile.php?user=gregavola. How can I do this in CodeIgniter?
U...
Given urls like this:
mysite.com/index.php
mysite.com/page/member/lobby.php
mysite.com/page/videos/video1.php
How can I rewrite the urls with .htaccess to hide the /page/ folder when it's present?
So the end result is:
mysite.com/index.php
mysite.com/member/lobby.php
mysite.com/videos/video1.php
...
My goal is to redirect:
http://users.domain.com/<username>/other/path/info
to
http://users.domain.com/other/path/info
The key here is that that the "username" in the source URL could of course be anything.
Here is a more concrete example of what I want to do (and why):
Suppose I have username of "bill". I want Bill to be ab...
Hello, I am using htaccess to redirect people from a domain that is registered on my host to a folder. Ex: the user type www.my2nddomain.com and I redirect them to www.my1stdomain.com/folder. But I wanted to show the domain the user typed instead of the address with the folder on it. How do I do it? Thanks in advance!
...
My situation:
We have a mobile version of our website, and want to start redirecting mobile users to it. The plan is to do this in Apache httpd.conf or .htaccess, using something like this:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (iPhone|Blackberry|...)
RewriteRule (.*) mobile/$1
However we want there to be a way for users t...
Im really really a newbie in regexp and I can’t figure out how to do that.
My goal is to have the RewriteRule to 'slice' the request URL path in 3 parts:
example.com/foo
#should return: index.php?a=foo&b=&c=
example.com/foo/bar
#should return: index.php?a=foo&b=bar&c=
example.com/foo/bar/baz
#should return: index.php?a=foo&b=bar&c=ba...
I want to use mod_redirect in cakephp. when user type domain name user should redirect to http://domain.com/index.html.
...
Here's what I have:
<VirtualHost 127.0.0.1>
DocumentRoot D:\XAMPP\xampp\htdocs\mysites\tupega.com
ServerName tupega.tld
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/nuevoanuncio$ /create/nuevoanuncio.php
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/regis...