Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to change the url of the below
http://mywebsite/address.php?state=oh&office_id=1426&l_name=%20IRONTON
to be
http://mywebsite/office/IRONTON.php
IRONTON.php is a fake page, and state=oh&office_id=1426&l_name=%20IRONTON are variables, so state, office_id and l_name will change every time
so I want the real url only to be changed as the above.
RewriteEngine on
RewriteRule ^office/IRONTON\.php$ address.php?state=oh&office_id=1426&l_name=%20IRONTON [QSA]
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
Currently I have this structure.
?id=83&download=jerhub&title=The Post - Title Here
Is it possible for me to make my URL structure something like this?
/83-the-post-title-here.html
Completely removing the download variable from the clean URL structure, while still being able to call it on page?
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I know that there has been question concerning url re-write but the once I have seen have not solved my problem.
I have to edit this question.
Forward slash is not working when I am re-writing a url. WHat do I do
([a-zA-Z0-9-])+ => any alpha numeric combination with hyphen (-)
/? => may or may not end with /
that is
domain.com/name/abcd-efg/21
or
domain.com/name/abcd-efg/21/
The NC is important.
RewriteEngine On
RewriteRule ^name/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)\/?/?$ index.php?var=$1&spell=$2 [NC,L]
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a page
root/pages/?id=webdesign
and I want to translate it into something like
root/pages/webdesign
To keep the prefix and replace the last part with a query string
RewriteCond %{QUERY_STRING} !^id=
RewriteRule ^root/pages/(.+)$ /root/pages/?id=$1 [L]
The RewriteCond is needed to prevent a rewrite loop.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have a PHP script which accepts some query string parameters. However, I want the user to call it without including the script name e.g. example.com/?foo=bar.
I've tried writing a mod_rewrite rule, but it redirects the user, which isn't what I want.
If you rename the script to index.php, accessing example.com/?p=asd&p2=dsa should work.
For the RewriteRule, make sure you don't have [R] after it.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I can't figure out how to write a htaccess rule that does the following:
seapip.com/bambi/yellow.scss -> seapip.com/magic.php/yellow.scss
Try with:
RewriteRule ^bambi/(.+).scss$ /magic.php/$1.scss [L]