RewriteRule replace dash with slash
up vote
0
down vote
favorite
I want to add a match any file that has the name starting with "report-", and replace the - with a slash ( / ).
For example report-one.php should converted to report/one
I am trying following, but it gives error (Internal Server Error):
RewriteRule ^report/([^.]+)/? report-$1.php [QSA]
How can I do that?
apache mod-rewrite url-rewriting
add a comment |
up vote
0
down vote
favorite
I want to add a match any file that has the name starting with "report-", and replace the - with a slash ( / ).
For example report-one.php should converted to report/one
I am trying following, but it gives error (Internal Server Error):
RewriteRule ^report/([^.]+)/? report-$1.php [QSA]
How can I do that?
apache mod-rewrite url-rewriting
ThatRewriteRule
works for me. Did you check the Apache error log for what was about the Internal Server Error?
– Dan D.
2 days ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to add a match any file that has the name starting with "report-", and replace the - with a slash ( / ).
For example report-one.php should converted to report/one
I am trying following, but it gives error (Internal Server Error):
RewriteRule ^report/([^.]+)/? report-$1.php [QSA]
How can I do that?
apache mod-rewrite url-rewriting
I want to add a match any file that has the name starting with "report-", and replace the - with a slash ( / ).
For example report-one.php should converted to report/one
I am trying following, but it gives error (Internal Server Error):
RewriteRule ^report/([^.]+)/? report-$1.php [QSA]
How can I do that?
apache mod-rewrite url-rewriting
apache mod-rewrite url-rewriting
asked Nov 19 at 12:03
user1355300
1,958143562
1,958143562
ThatRewriteRule
works for me. Did you check the Apache error log for what was about the Internal Server Error?
– Dan D.
2 days ago
add a comment |
ThatRewriteRule
works for me. Did you check the Apache error log for what was about the Internal Server Error?
– Dan D.
2 days ago
That
RewriteRule
works for me. Did you check the Apache error log for what was about the Internal Server Error?– Dan D.
2 days ago
That
RewriteRule
works for me. Did you check the Apache error log for what was about the Internal Server Error?– Dan D.
2 days ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374258%2frewriterule-replace-dash-with-slash%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
That
RewriteRule
works for me. Did you check the Apache error log for what was about the Internal Server Error?– Dan D.
2 days ago