•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Linux Servers and Apache section within the Tech Talk category of DaniWeb, a massive community of 426,809 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,880 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Linux Servers and Apache advertiser: Programming Forums
Views: 3619 | Replies: 4
![]() |
•
•
Join Date: Oct 2006
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
Hi
I recently added
Options +Multiviews
to my .htaccess file so that URLs on my site would be
mydomain.com/features/cars
rather than
mydomain/features/cars.php
It's working fine, but I now wish to redirect bookmarked users and robots that request the old URLs.
I've tried
Redirect /features/cars.php
http://mydomain.com/features/cars
but this gives file not found: presumably as you can't redirect to the same place.
Does anyone know how to do this?
thanks in advance
I recently added
Options +Multiviews
to my .htaccess file so that URLs on my site would be
mydomain.com/features/cars
rather than
mydomain/features/cars.php
It's working fine, but I now wish to redirect bookmarked users and robots that request the old URLs.
I've tried
Redirect /features/cars.php
http://mydomain.com/features/cars
but this gives file not found: presumably as you can't redirect to the same place.
Does anyone know how to do this?
thanks in advance
•
•
Join Date: Oct 2006
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
I now suspect it's a job for mod_rewrite: after all you can change the URL to have the www in if the user doesn't type it:
RewriteCond %{HTTP_HOST} ^mydomain.co.uk
RewriteRule (.*) http://www.mydomains.co.uk/$1 [R=301,L]
So how do I Rewrite all filename.php requests on my site to filename
(no .php)?
cheers
geekpie
RewriteCond %{HTTP_HOST} ^mydomain.co.uk
RewriteRule (.*) http://www.mydomains.co.uk/$1 [R=301,L]
So how do I Rewrite all filename.php requests on my site to filename
(no .php)?
cheers
geekpie
•
•
Join Date: Aug 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Finally, I found a reference for this. Ok I'm fairly new to this. I'm assuming I need apache with my hosting.
Where can I find a good reference for learning how to have all the files on my website say www.website.com/file/filename.php to just say www.website.com/file/filename ?
I noticed it has something to do with a htaaccess file..
can anyone explain or send me in the right direction?
Thanks
Mike
Where can I find a good reference for learning how to have all the files on my website say www.website.com/file/filename.php to just say www.website.com/file/filename ?
I noticed it has something to do with a htaaccess file..
can anyone explain or send me in the right direction?
Thanks
Mike
•
•
Join Date: Oct 2006
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
in your .htaccess
Options +Multiviews
see
http://httpd.apache.org/docs/1.3/con...gotiation.html
"Using a 'MultiViews' search, where the server does an implicit filename pattern match and chooses from among the results. "
Options +Multiviews
see
http://httpd.apache.org/docs/1.3/con...gotiation.html
"Using a 'MultiViews' search, where the server does an implicit filename pattern match and chooses from among the results. "
•
•
Join Date: Oct 2006
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
in your .htaccess
Options +Multiviews
see
http://httpd.apache.org/docs/1.3/con...gotiation.html
"Using a 'MultiViews' search, where the server does an implicit filename pattern match and chooses from among the results. "
Options +Multiviews
see
http://httpd.apache.org/docs/1.3/con...gotiation.html
"Using a 'MultiViews' search, where the server does an implicit filename pattern match and chooses from among the results. "
![]() |
•
•
•
•
•
•
•
•
DaniWeb Linux Servers and Apache Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
apple bbc cd cellphone choose code computer core debian dell desktop development drivers enterprise fedora fiji games gentoo gpl hardware ibm infrastructure install kernel laptop linux marketing microsoft mobile news novell open open source openoffice operating os palm preinstall red hat rhel security server source sun system ubuntu unix vista web windows
- Can't double-click on drive C in My Computer (Windows NT / 2000 / XP / 2003)
- How to validate an image field with javascript (JavaScript / DHTML / AJAX)
- wxpython and py2exe (Python)
- modify script (Perl)
- RmDir and MsChart Have Problems in XP -Pls Help (Visual Basic 4 / 5 / 6)
- php error HELP!!! (PHP)
- multiple file searching (C)
- How do assign a file name to save in C (C++)
- NEED HELP! can't install anything (Windows NT / 2000 / XP / 2003)
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: How Do I redirect filename on site to have no extension and be viewed?
- Next Thread: Actiontec giving me a headache


Linear Mode