Is it possible to make movies.php to /movies/ with htaccess?
Example:
http://domain.com/movies.php?movie=avengers
to
http://domain.com/movies/avengers
Related
How to create an SEO friendly URL like example.com/pages/my-first-page/followers here I want how to create a structure in if(isset($_GET['followers'])){...} and htaccess file.
My link working fine till example.com/pages/my-first-page/ but now I want to add followers section.
I hope i explain well what I expecting. Thanks for your help
Rule you've suggested is this:
RewriteRule ^pages/([\w-]+)/followers/?$ page.php?pages=$1&followers=1 [QSA,NC,L]
This is pretty good rule and there is no reason why it should not work. Make sure this rule is placed before page rule which is your first rule in .htaccess
My URL is
http://127.0.0.1/public_html/organisation/home/index.php?page=Your-Profile
but i want my url looks like this using .htaccess only:-
http://127.0.0.1/public_html/organisation/home/Your-Profile
i want to remove using .htaccess file index.php?page=
Please Help Me..
You can remove the /index.php as this is assumed/set by default by the engine, but you can't remove the ?page= as this is a query parameter, not part of the 'url' as you are thinking it. So it would look like http://127.0.0.1/public_html/organisation/home?page=Your-Profile
If you're using wordpress then there is an option in admin to set 'pretty urls' which would achieve this through other means.
This is really bugging me, for something that should be real simple.
Trying to 301 redirect a URL (via htaccess) - in the following manner:
https://www.example.com/forums/sub-forum/index.php
needs to be redirected to:
https://www.example.com/forums/sub-forum/
Basically want to get rid of the index.php (note: the sub-forum is a wildcard, as it can be anything, e.g. football-forum or tennis-forum etc...)
So far I've managed to work out that I need to do something along these lines:
RedirectMatch 301 ^/forums/.*/index.php /forums/<wildcard>
However, I'm not sure what to put in instead of <wildcard> part. I've tried putting .*, but that doesn't work
Any ideas on how to achieve this? Your help would be much appreciated.
Many thanks.
How can I change url in this way using htaccess?
http://www.domain.com/index.html?page=home
http://www.domain.com/indexf6f2.html?page=blog
To
http://www.domain.com/?page=home
http://www.domain.com/?page=blog
You could try to generate your own .htaccess file based on your rules using this site http://cooletips.de/htaccess/ .
Regards, Hiawatha
I am not giving exact solution. Just utilize the followings, then you will be able to solve other URL rewriting using .htaccess
Take help from the following URL
http://roshanbh.com.np/2008/03/url-rewriting-examples-htaccess.html
Other important regarding rewriting through .htaccess
http://corz.org/serv/tricks/htaccess2.php
RewriteRule to rename URL?
For a nice basic
http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html
I have some old urls
http://www.website.com/result/?q=&result=1
http://www.website.com/result/?q=&result=2
http://www.website.com/result/?q=&result=3
http://www.website.com/result/?q=&result=4
etc.. probably going up to about 60
Is there anyway I can create one rule that redirects any query that looks like this to the home page /home/ instead of my trying to redirect all of them individualy?
Thanks in advance
yes, i suppose you are using apache HTTPD. In your server configuration you can define an regular expression which filter the pattern you want. For example:
<FilesMatch "/site/*">
...
</FilesMatch>
Define a RegExp and tell where to redirect or what to do.
Hope this helps, Cheers